public function comments()
{
return $this->hasMany('App\Comment');
}
public function store(Request $request)
{
$post = Post::findOrFail($request->post_id);
$post->comments()->create([
'author_id' => \Auth::user()->id,
'comment' => $request->comment
]);
return redirect()->back()->with('success', 'Комментарий добавлен');
}