diff --git a/app/Http/Controllers/PrestamoController.php b/app/Http/Controllers/PrestamoController.php new file mode 100644 index 0000000..da28249 --- /dev/null +++ b/app/Http/Controllers/PrestamoController.php @@ -0,0 +1,65 @@ + + */ +class PrestamoFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + // + ]; + } +} diff --git a/database/migrations/2025_03_27_174121_create_prestamos_table.php b/database/migrations/2025_03_27_174121_create_prestamos_table.php new file mode 100644 index 0000000..1428b4e --- /dev/null +++ b/database/migrations/2025_03_27_174121_create_prestamos_table.php @@ -0,0 +1,27 @@ +id(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('prestamos'); + } +}; diff --git a/resources/views/layouts/dashboard.blade.php b/resources/views/layouts/dashboard.blade.php index 577c2f2..01bd240 100644 --- a/resources/views/layouts/dashboard.blade.php +++ b/resources/views/layouts/dashboard.blade.php @@ -51,11 +51,58 @@ -
  • - - - Préstamos - +
  • + + + +
  • diff --git a/resources/views/prestamos.blade.php b/resources/views/prestamos.blade.php new file mode 100644 index 0000000..e69de29 diff --git a/resources/views/prestamosCrearEditar.blade.php b/resources/views/prestamosCrearEditar.blade.php new file mode 100644 index 0000000..e69de29 diff --git a/routes/web.php b/routes/web.php index 262fee8..a19285e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -6,11 +6,9 @@ use App\Http\Controllers\HomeController; use App\Http\Controllers\MarcaController; use App\Http\Controllers\DocentesController; use App\Http\Controllers\TiposVeiculosController; - use App\Http\Controllers\TiposLicenciasController; - - use App\Http\Controllers\CapacidadController; +use App\Http\Controllers\PrestamoController; /* |-------------------------------------------------------------------------- @@ -23,30 +21,31 @@ use App\Http\Controllers\CapacidadController; | */ -Route::get('/', function () { - return redirect()->route('dashboard'); -}); + Route::get('/', function () { + return redirect()->route('dashboard'); + }); -Auth::routes(['register'=>true,'reset'=>false]); + Auth::routes(['register'=>true,'reset'=>false]); -Route::resource('marca', MarcaController::class); -Route::resource('docentes', DocentesController::class); -Route::resource('vehiculos', TiposVeiculosController::class); + Route::resource('marca', MarcaController::class); + Route::resource('docentes', DocentesController::class); + Route::resource('vehiculos', TiposVeiculosController::class); -Route::resource('tiposLicencias', TiposLicenciasController::class); -Route::get('/tiposLicencias/{id}/toggle-status', [TiposLicenciasController::class, 'toggleStatus'])->name('tiposLicencias.toggle-status'); + Route::resource('tiposLicencias', TiposLicenciasController::class); + Route::get('/tiposLicencias/{id}/toggle-status', [TiposLicenciasController::class, 'toggleStatus'])->name('tiposLicencias.toggle-status'); -Route::resource('capacidades', CapacidadController::class); + Route::resource('capacidades', CapacidadController::class); + Route::resource('prestamos',PrestamoController::class); -Route::get('marcas/excel', [MarcaController::class, 'exportExcel'])->name('marcas.excel'); -Route::get('marcas/pdf', [MarcaController::class, 'exportPDF'])->name('marcas.pdf'); + Route::get('marcas/excel', [MarcaController::class, 'exportExcel'])->name('marcas.excel'); + Route::get('marcas/pdf', [MarcaController::class, 'exportPDF'])->name('marcas.pdf'); -Route::get('/docentes/export/{format}', [DocentesController::class, 'export'])->name('docentes.export'); -Route::get('/docentes/{id}/toggle-status', [DocentesController::class, 'toggleStatus'])->name('docentes.toggle-status'); + Route::get('/docentes/export/{format}', [DocentesController::class, 'export'])->name('docentes.export'); + Route::get('/docentes/{id}/toggle-status', [DocentesController::class, 'toggleStatus'])->name('docentes.toggle-status'); -// Rutas protegidas que requieren autenticación -Route::middleware(['auth'])->group(function () { + // Rutas protegidas que requieren autenticación + Route::middleware(['auth'])->group(function () { Route::get('/dashboard', [HomeController::class, 'index'])->name('dashboard'); Route::get('/usuarios', [usuariosController::class,'index'])->name('usuarios'); Route::get('/usuarios/nuevo', [usuariosController::class, 'create'])->name('usuarios.create');