/** * Display a listing of the resource. * * @return Response */ public function index() { return response()->json(['datos' => Vehiculo::all()]); }
public function listado($propietario) { $vehiculo = Vehiculo::all(); return view("propietario.listavehiculos")->with("vehiculos", $vehiculo)->with("propietario", $propietario); }
/** * Display a listing of the resource. * * @return Response */ public function index() { // $fabricante = Fabricante::find($id); // return response()->json($fabricante-> vehiculos(),200); ; response()->json(['datos' => Vehiculo::all()], 200); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $vehiculos = Vehiculo::all(); $conductore = Conductor::find($id); return view("conductor.edit")->with("conductore", $conductore)->with('vehiculos', $vehiculos); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $data = Vehiculo::all(); $res = ['data' => $data]; return response()->json($res, 200); }
public function index() { $vehiculos = Vehiculo::all(); return response()->json(['datos' => $vehiculos], 200); }