Browse Source

jsxka

csedcdc
main
sergiomarquez778 7 days ago
parent
commit
0d2538ff97
  1. 4
      app/Http/Controllers/PrestamoController.php
  2. 16
      routes/web.php

4
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

16
routes/web.php

@ -36,15 +36,15 @@ use App\Http\Controllers\PrestamoController;
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/{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
});
Loading…
Cancel
Save