agregado de modificaciones
This commit is contained in:
parent
39effee43b
commit
124de6eae4
1
BD/consultas.txt
Normal file
1
BD/consultas.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
INSERT INTO categorias (nombre, descripcion) VALUES ('Tecnología', 'Productos y servicios tecnológicos'), ('Educación', 'Cursos, capacitaciones y formación'), ('Salud', 'Servicios médicos y bienestar'), ('Deportes', 'Actividades deportivas y recreativas'), ('Alimentos', 'Productos alimenticios'), ('Transporte', 'Servicios de movilidad y logística'), ('Turismo', 'Viajes, hospedaje y excursiones'), ('Finanzas', 'Servicios financieros y bancarios'), ('Entretenimiento', 'Cine, música y ocio'), ('Hogar', 'Productos y servicios para el hogar');
|
||||||
|
|
@ -12,6 +12,15 @@ class CategoriasController extends Controller
|
||||||
public function index(Request $request){
|
public function index(Request $request){
|
||||||
|
|
||||||
$categorias = Categorias::all();
|
$categorias = Categorias::all();
|
||||||
|
/*$categorias = Categoria::findOrFail(1);
|
||||||
|
$categorias = Categoria::where('id_categoria', 1)->get();
|
||||||
|
$categorias = Categoria::where('nombre', 'Tecnología')->get();
|
||||||
|
$categorias = Categoria::where('nombre', 'like', '%tec%')->get();
|
||||||
|
$categorias = Categoria::orderBy('nombre', 'asc')->get();
|
||||||
|
$categorias = Categoria::first();
|
||||||
|
$categorias = Categoria::last();
|
||||||
|
Categoria::count();*/
|
||||||
|
|
||||||
|
|
||||||
return view('categorias.index', ["categorias"=>$categorias]);
|
return view('categorias.index', ["categorias"=>$categorias]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user