From 1c7787c0bb45bf91e68e24c755688e39eb743275 Mon Sep 17 00:00:00 2001 From: Flavio Barachino Date: Mon, 3 Jul 2023 20:26:38 +0200 Subject: [PATCH] Creato list view per i clienti e relativa route --- ...023_07_03_162026_create_clientes_table.php | 14 ++++++ resources/views/cliente/edit.blade.php | 0 resources/views/cliente/list.blade.php | 43 +++++++++++++++++++ resources/views/cliente/new.blade.php | 0 routes/web.php | 1 + 5 files changed, 58 insertions(+) create mode 100644 resources/views/cliente/edit.blade.php create mode 100644 resources/views/cliente/list.blade.php create mode 100644 resources/views/cliente/new.blade.php diff --git a/database/migrations/2023_07_03_162026_create_clientes_table.php b/database/migrations/2023_07_03_162026_create_clientes_table.php index c7fc596..501436e 100644 --- a/database/migrations/2023_07_03_162026_create_clientes_table.php +++ b/database/migrations/2023_07_03_162026_create_clientes_table.php @@ -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(); }); } diff --git a/resources/views/cliente/edit.blade.php b/resources/views/cliente/edit.blade.php new file mode 100644 index 0000000..e69de29 diff --git a/resources/views/cliente/list.blade.php b/resources/views/cliente/list.blade.php new file mode 100644 index 0000000..65dfcd4 --- /dev/null +++ b/resources/views/cliente/list.blade.php @@ -0,0 +1,43 @@ +@extends('layouts.app') +@section('content') +
+
+
+
+
{{ __('Clienti') }}
+ +
+ + + + + + + + + + + + + + + @foreach($clienti as $cliente) + + + + + + + + + > + + @endforeach + +
Id Cognome Nome Azienda E-mail Telefono Cellulare Città
{{$cliente->id}}{{$cliente->Cognome}}{{$cliente->Nome}}{{$cliente->Azienda}}{{$cliente->Email}}{{$cliente->Telefono}}{{$cliente->Cellulare}}{{$cliente->Citta}}
+
+
+
+
+
+@endsection diff --git a/resources/views/cliente/new.blade.php b/resources/views/cliente/new.blade.php new file mode 100644 index 0000000..e69de29 diff --git a/routes/web.php b/routes/web.php index cb10722..20e5a23 100644 --- a/routes/web.php +++ b/routes/web.php @@ -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'); });;