/** * Store a newly created resource in storage. * * @return Response */ public function store() { $input = Input::all(); $validation = Validator::make($input, Professor::$rules); if ($validation->passes()) { $this->professor->create($input); return Redirect::route('admin.professor.index'); } return Redirect::route('admin.professor.index')->withInput()->withErrors($validation)->with('message', 'There were validation errors.'); }