public function postDestroy() { $type = CarType::find(Input::get('id')); if ($type) { $type->delete(); return Redirect::to('admin/car_types/index')->with('message', 'Car Type Deleted'); } return Redirect::to('admin/car_types/index')->with('message', 'Something went wrong, please try again'); }
public function getCarType($type_id) { return View::make('store.car_type')->with('cars', Car::where('type_id', '=', $type_id)->orderBy('price')->paginate(3))->with('car_type', CarType::find($type_id)); }