public function store(Request $request) { $comment = new BlogComment(); $comment->username = Auth::id(); $comment->content = $request->input('content'); $comment->article_id = $request->input('article_id'); $comment->save(); return Redirect::back(); }
/** * Store a newly created resource in storage. * * @return Response */ public function storecomment(BlogCommentRequest $request, Blog $blog) { $blogcooment = new BlogComment($request->all()); $blogcooment->blog_id = $blog->id; $blogcooment->save(); return redirect('admin/blog/' . $blog->id . '/show'); }