/** * 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'); }
/** * Unapprove the specified resource. * * @param int $id * @return Response */ public function getUnapprove($id) { $this->actionhandler->comment_unapprove($id); return Redirect::action('Alexwenzel\\LaravelCommentary\\ManagementController@getIndex'); }