/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create($id_make) { $nav = 'ad_vehicle_models'; $action = 'new'; $main_menu = $this->menu_principal(); $array_data = $this->array_data(); $make = VehicleMake::where('id', $id_make)->first(); return view('admin.adVehicleModels.new', compact('nav', 'action', 'main_menu', 'array_data', 'make')); }
/** * @return Collection */ public function getVehicleMakes() { return VehicleMake::with('models')->where('active', true)->orderBy('make', 'ASC')->get(); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { VehicleMake::where('id', $id)->delete(); return redirect()->route('admin.vehicle_makes.list', ['nav' => 'ad_vehicle_makes', 'action' => 'list'])->with(array('ok' => 'Registro eliminado correctametne')); }