public function show($id) { //abort(404); $contents = Topic::findOrFail($id); $vote = ['status' => '']; if (Auth::check()) { $vote = Recomment::user(Auth::user()->user_id)->topic($id)->first(); } $comment = Comment::with('user')->comment($id)->get(); $last_comment = Comment::with('user')->comment($id)->orderBy('created_at', 'desc')->first(); return view('posts.show', compact('contents', 'vote', 'comment', 'last_comment')); }