예제 #1
0
 public function store()
 {
     if (Comment::create(Input::all())) {
         return Redirect::back();
     } else {
         return Redirect::back()->withInput()->withErrors('评论发表失败!');
     }
 }
예제 #2
0
 public function destroy($id)
 {
     $comment = Comment::find($id);
     $comment->delete();
     return Redirect::to('admin/comments');
 }