public function postCreate() { $validator = Validator::make(Input::all(), CarType::$rules); if ($validator->passes()) { $type = new CarType(); $type->name = Input::get('name'); $type->save(); return Redirect::to('admin/car_types/index')->with('message', 'New Car Type Created'); } return Redirect::to('admin/car_types/index')->with('message', 'Something went wrong')->withErrors($validator)->withInput(); }