/** * Handler for the submitted comment form * @return Response */ public function postComment() { $validator = Validator::make($data = Input::all(), $this->actionhandler->comment_rules()); if ($validator->fails()) { return Redirect::back()->with('laravelcommentary.message', Lang::get('laravel-commentary::texts.form.post_fails'))->with('laravelcommentary.messageclass', 'error')->withErrors($validator)->withInput(); } $model = $this->actionhandler->comment_post($data); return Redirect::back()->with('laravelcommentary.message', Lang::get('laravel-commentary::texts.form.post_success'))->with('laravelcommentary.messageclass', 'success'); }