From f58786b4f40c658b55c27e5aaeb293dfdc33d358 Mon Sep 17 00:00:00 2001 From: Eduardo24052 Date: Thu, 27 Feb 2025 18:43:43 -0600 Subject: [PATCH] Crear Modelos, Migraciones y Controladores Crear Modelos, Migraciones y Controladores HistorialPrestamos --- .../HistorialPrestamosController.php | 65 ++++ app/Models/HistorialPrestamos.php | 12 + .../factories/HistorialPrestamosFactory.php | 23 ++ ...03024_create_historial_prestamos_table.php | 27 ++ database/seeders/HistorialPrestamosSeeder.php | 17 + resources/views/welcome.blade.php | 290 +----------------- routes/web.php | 3 + 7 files changed, 162 insertions(+), 275 deletions(-) create mode 100644 app/Http/Controllers/HistorialPrestamosController.php create mode 100644 app/Models/HistorialPrestamos.php create mode 100644 database/factories/HistorialPrestamosFactory.php create mode 100644 database/migrations/2025_02_28_003024_create_historial_prestamos_table.php create mode 100644 database/seeders/HistorialPrestamosSeeder.php diff --git a/app/Http/Controllers/HistorialPrestamosController.php b/app/Http/Controllers/HistorialPrestamosController.php new file mode 100644 index 0000000..a4216b5 --- /dev/null +++ b/app/Http/Controllers/HistorialPrestamosController.php @@ -0,0 +1,65 @@ + */ + use HasFactory; +} diff --git a/database/factories/HistorialPrestamosFactory.php b/database/factories/HistorialPrestamosFactory.php new file mode 100644 index 0000000..5f3b45a --- /dev/null +++ b/database/factories/HistorialPrestamosFactory.php @@ -0,0 +1,23 @@ + + */ +class HistorialPrestamosFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + // + ]; + } +} diff --git a/database/migrations/2025_02_28_003024_create_historial_prestamos_table.php b/database/migrations/2025_02_28_003024_create_historial_prestamos_table.php new file mode 100644 index 0000000..f596af3 --- /dev/null +++ b/database/migrations/2025_02_28_003024_create_historial_prestamos_table.php @@ -0,0 +1,27 @@ +id(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('historial_prestamos'); + } +}; diff --git a/database/seeders/HistorialPrestamosSeeder.php b/database/seeders/HistorialPrestamosSeeder.php new file mode 100644 index 0000000..688f98a --- /dev/null +++ b/database/seeders/HistorialPrestamosSeeder.php @@ -0,0 +1,17 @@ + - - - - - - Laravel - - - - - - - @if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot'))) - @vite(['resources/css/app.css', 'resources/js/app.js']) - @else - - @endif - - -
- @if (Route::has('login')) - - @endif -
-
-
-
-

Let's get started

-

Laravel has an incredibly rich ecosystem.
We suggest starting with the following.

- - -
-
- {{-- Laravel Logo --}} - - - - - - - - - - - {{-- Light Mode 12 SVG --}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{-- Dark Mode 12 SVG --}} - -
-
-
-
- - @if (Route::has('login')) - - @endif - + + + + + + Inicio + + +

Bienvenido a la Gestión de Vehículos

+

Selecciona una opción:

+ + diff --git a/routes/web.php b/routes/web.php index 86a06c5..5339bf4 100644 --- a/routes/web.php +++ b/routes/web.php @@ -2,6 +2,9 @@ use Illuminate\Support\Facades\Route; + Route::get('/', function () { return view('welcome'); }); + +