From 0d2538ff9795cda99257d1a5e6e2b1897a3a5019 Mon Sep 17 00:00:00 2001 From: sergiomarquez778 Date: Thu, 27 Mar 2025 13:15:51 -0600 Subject: [PATCH] jsxka csedcdc --- app/Http/Controllers/PrestamoController.php | 6 +---- routes/web.php | 28 ++++++++++----------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/app/Http/Controllers/PrestamoController.php b/app/Http/Controllers/PrestamoController.php index 7c4cfbe..3014c21 100644 --- a/app/Http/Controllers/PrestamoController.php +++ b/app/Http/Controllers/PrestamoController.php @@ -57,9 +57,7 @@ class PrestamoController extends Controller 'motivo' => 'required|string|max:255', 'domicilio' => 'required|string|max:255', 'numero_personas' => 'required|integer', - ]); - // Crea un nuevo préstamo $prestamo = new Prestamo(); $prestamo->nombre_solicitante = $request->nombre_solicitante; @@ -98,8 +96,6 @@ class PrestamoController extends Controller 'motivo' => 'required|string|max:255', 'domicilio' => 'required|string|max:255', 'numero_personas' => 'required|integer', - - ]); $prestamo = Prestamo::findOrFail($id); // Encuentra el préstamo por ID @@ -146,4 +142,4 @@ class PrestamoController extends Controller $pdf = PDF::loadView('exports.prestamos-pdf', ['prestamos' => $prestamos]); return $pdf->download('prestamos.pdf'); } -} \ No newline at end of file +} diff --git a/routes/web.php b/routes/web.php index 8b6b264..4a7bbe9 100644 --- a/routes/web.php +++ b/routes/web.php @@ -29,22 +29,22 @@ use App\Http\Controllers\PrestamoController; Route::resource('marca', MarcaController::class); Route::resource('docentes', DocentesController::class); - + // Rutas específicas de vehículos Route::get('vehiculos/excel', [TiposVeiculosController::class, 'exportExcel'])->name('vehiculos.excel'); Route::get('vehiculos/pdf', [TiposVeiculosController::class, 'exportPDF'])->name('vehiculos.pdf'); Route::get('/vehiculos/{id}/toggle-status', [TiposVeiculosController::class, 'toggleStatus'])->name('vehiculos.toggle-status'); Route::resource('vehiculos', TiposVeiculosController::class); -<<<<<<< HEAD -Route::resource('tiposLicencias', TiposLicenciasController::class); -Route::get('tiposLicencias/excel', [TiposLicenciasController::class, 'exportExcel'])->name('tiposLicencias.excel'); -Route::get('tiposLicencias/pdf', [TiposLicenciasController::class, 'exportPDF'])->name('tiposLicencias.pdf'); -Route::get('/tiposLicencias/{id}/toggle-status', [TiposLicenciasController::class, 'toggleStatus'])->name('tiposLicencias.toggle-status'); -======= + + Route::resource('tiposLicencias', TiposLicenciasController::class); + Route::get('tiposLicencias/excel', [TiposLicenciasController::class, 'exportExcel'])->name('tiposLicencias.excel'); + Route::get('tiposLicencias/pdf', [TiposLicenciasController::class, 'exportPDF'])->name('tiposLicencias.pdf'); + 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'); ->>>>>>> 30c1f1275efa9ed41cac7a6add2617731e9054c0 + Route::resource('capacidades', CapacidadController::class); Route::resource('prestamos',PrestamoController::class); @@ -55,16 +55,16 @@ Route::get('/tiposLicencias/{id}/toggle-status', [TiposLicenciasController::clas Route::get('/docentes/export/{format}', [DocentesController::class, 'export'])->name('docentes.export'); Route::get('/docentes/{id}/toggle-status', [DocentesController::class, 'toggleStatus'])->name('docentes.toggle-status'); -<<<<<<< HEAD + Route::get('tiposLicencias/excel', [TiposLicenciasController::class, 'exportExcel'])->name('tiposLicencias.excel'); Route::get('tiposLicencias/pdf', [TiposLicenciasController::class, 'exportPDF'])->name('tiposLicencias.pdf'); // Rutas protegidas que requieren autenticación -Route::middleware(['auth'])->group(function () { -======= + + // Rutas protegidas que requieren autenticación Route::middleware(['auth'])->group(function () { ->>>>>>> 30c1f1275efa9ed41cac7a6add2617731e9054c0 + 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'); @@ -77,6 +77,6 @@ Route::middleware(['auth'])->group(function () { Route::get('usuarios/pdf', [usuariosController::class, 'exportPDF'])->name('usuarios.pdf'); Route::get('/home', [HomeController::class, 'index'])->name('home'); +////corerecion rubi - -}); +}); \ No newline at end of file