From ed040c21218e3593bb85ca7f7e680361cd21f26a Mon Sep 17 00:00:00 2001 From: TheSilva7 Date: Fri, 28 Mar 2025 11:48:14 -0600 Subject: [PATCH] si --- app/Http/Controllers/TiposVeiculosController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/TiposVeiculosController.php b/app/Http/Controllers/TiposVeiculosController.php index 736c030..fa75282 100644 --- a/app/Http/Controllers/TiposVeiculosController.php +++ b/app/Http/Controllers/TiposVeiculosController.php @@ -16,7 +16,7 @@ class TiposVeiculosController extends Controller $busqueda = $request->busqueda; if($busqueda) { - $tiposVeiculos = tiposVeiculos::where('nombre', 'LIKE', "%{$busqueda}%")->get(); + $tiposVeiculos = tiposVeiculos::where('nombre', 'LIKE', "%{$busqueda}%")->where('status', true)->get(); if($tiposVeiculos->count() == 0) { return redirect()->route('tiposVeiculos.index') @@ -34,7 +34,7 @@ class TiposVeiculosController extends Controller } // Si no hay búsqueda, mostrar todas las marcas - $tiposVeiculos = tiposVeiculos::all(); + $tiposVeiculos = tiposVeiculos::where('status', true)->get(); return view('vehiculos', ["tiposVeiculos" => $tiposVeiculos]); }