Skip to content

Commit

Permalink
licencias
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiagoSierra committed Jun 24, 2022
1 parent 283b100 commit f1145d7
Show file tree
Hide file tree
Showing 9 changed files with 207 additions and 1 deletion.
87 changes: 87 additions & 0 deletions app/Http/Controllers/LicenceController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?php

namespace App\Http\Controllers;

use App\Models\Licence;
use Illuminate\Http\Request;

class LicenceController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{


return view('licences.index');
}

/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}

/**
* Display the specified resource.
*
* @param \App\Models\Licence $licence
* @return \Illuminate\Http\Response
*/
public function show(Licence $licence)
{
//
}

/**
* Show the form for editing the specified resource.
*
* @param \App\Models\Licence $licence
* @return \Illuminate\Http\Response
*/
public function edit(Licence $licence)
{
//
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Models\Licence $licence
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Licence $licence)
{
//
}

/**
* Remove the specified resource from storage.
*
* @param \App\Models\Licence $licence
* @return \Illuminate\Http\Response
*/
public function destroy(Licence $licence)
{
//
}
}
14 changes: 14 additions & 0 deletions app/Models/Licence.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Licence extends Model
{
//
protected $fillable = ['LicenseKey', 'ProductID', 'product_id', 'Status', 'PartnerID', 'partner_id', 'MasterCode', 'UserID', 'user_id'];



}
12 changes: 12 additions & 0 deletions database/factories/LicenceFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

/** @var \Illuminate\Database\Eloquent\Factory $factory */

use App\Models\Licence;
use Faker\Generator as Faker;

$factory->define(Licence::class, function (Faker $faker) {
return [
//
];
});
40 changes: 40 additions & 0 deletions database/migrations/2022_06_24_173345_create_licences_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateLicencesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('licences', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->string('LicenseKey');
$table->integer('ProductID');
$table->integer('product_id');
$table->integer('Status');
$table->string('PartnerID');
$table->integer('partner_id');
$table->string('MasterCode');
$table->string('UserID');
$table->integer('user_id');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('licences');
}
}
16 changes: 16 additions & 0 deletions database/seeds/LicenceSeeder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

use Illuminate\Database\Seeder;

class LicenceSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
}
}
2 changes: 1 addition & 1 deletion resources/views/layouts/navbars/sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</a>
</li>
<li @if ($pageSlug=='icons' ) class="active" @endif>
<a href="javascript:void(0)">
<a href="{{ route('licences.index') }}">
<i class="tim-icons icon-badge"></i>
<p>Generar licencias</p>
</a>
Expand Down
Empty file.
35 changes: 35 additions & 0 deletions resources/views/licences/index.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@extends('layouts.app', ['page' => __('Lista de licencias'), 'pageSlug' => 'licences'])

@section('content')
<div class="row">
<div class="col-md-12">
<div class="card ">
<div class="card-header">
<h4 class="card-title"> Licencias</h4>
</div>
<div class="card-body">
<div class="table-responsive ps">
<table class="table tablesorter w-100" id="">
<thead class="text-primary">
<tr>

</tr>
</thead>
<tbody>

</tbody>
</table>


</div>
</div>
</div>
</div>
</div>
@endsection

@push('js')
<script>
</script>
@endpush
2 changes: 2 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
Route::resource('users', UserController::class);
Route::resource('partners', PartnerController::class);
Route::resource('products', ProductController::class);
Route::resource('licences', LicenceController::class);

Route::get('profile/edit', 'ProfileController@edit')->name('profile.edit');
Route::put('profile/update', 'ProfileController@update')->name('profile.update');
Route::put('profile/password', 'ProfileController@password')->name('profile.password');

});

0 comments on commit f1145d7

Please sign in to comment.