Creato list view per i clienti e relativa route
This commit is contained in:
parent
95495035a3
commit
1c7787c0bb
@ -14,6 +14,20 @@ return new class extends Migration
|
||||
Schema::create('clientes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('Nome',100);
|
||||
$table->string('Cognome',100);
|
||||
$table->string('Azienda',255)->nullable();
|
||||
$table->string('CodiceFiscale',16);
|
||||
$table->string('PartitaIva',16)->nullable();
|
||||
$table->longText('Indirizzo');
|
||||
$table->string('Cap',5);
|
||||
$table->string('Citta',50);
|
||||
$table->string('Provincia',50);
|
||||
$table->string('Nazione',50)->nullable()->default('Italia');
|
||||
$table->string('Telefono',30)->nullable();
|
||||
$table->string('Cellulare',30)->nullable();
|
||||
$table->string('Email',100)->nullable();
|
||||
$table->longText('Note')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
0
resources/views/cliente/edit.blade.php
Normal file
0
resources/views/cliente/edit.blade.php
Normal file
43
resources/views/cliente/list.blade.php
Normal file
43
resources/views/cliente/list.blade.php
Normal file
@ -0,0 +1,43 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Clienti') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table table-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> Id </th>
|
||||
<th> Cognome </th>
|
||||
<th> Nome </th>
|
||||
<th> Azienda </th>
|
||||
<th> E-mail </th>
|
||||
<th> Telefono </th>
|
||||
<th> Cellulare </th>
|
||||
<th> Città </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($clienti as $cliente)
|
||||
<tr>
|
||||
<td><a href="/cliente/edit/{{$cliente->id}}" class="button btn-danger">{{$cliente->id}}</a></td>
|
||||
<td>{{$cliente->Cognome}}</td>
|
||||
<td>{{$cliente->Nome}}</td>
|
||||
<td>{{$cliente->Azienda}}</td>
|
||||
<td>{{$cliente->Email}}</td>
|
||||
<td>{{$cliente->Telefono}}</td>
|
||||
<td>{{$cliente->Cellulare}}</td>
|
||||
<td>{{$cliente->Citta}}</td>>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
0
resources/views/cliente/new.blade.php
Normal file
0
resources/views/cliente/new.blade.php
Normal file
@ -25,5 +25,6 @@ Route::middleware(['auth'])->group(function () {
|
||||
Route::get('/admin/roles',[App\Http\Controllers\HomeController::class, 'roles'])->name('ruoli');
|
||||
Route::get('/admin/permissions',[App\Http\Controllers\HomeController::class, 'permissions'])->name('permessi');
|
||||
Route::get('/admin/users',[App\Http\Controllers\HomeController::class, 'users'])->name('utenti');
|
||||
Route::get('/cliente',[App\Http\Controllers\ClienteController::class,'listCliente'])->name('ListCliente');
|
||||
});;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user