/** * Display the specified resource. * * @param int $id * * @return Response */ public function show($id) { $post = Post::with(['author' => function ($query) { $query->select('id', 'name'); }])->find($id); if (!$post) { return redirect()->route('admin::@dmin-zone.posts.index'); } $category = $post->taxonomy()->first()->term()->first(); return view('post.admin_show', compact('post', 'category')); }