Exemple #1
0
 /**
  * Show an existing post.
  *
  * @param PostRepositoryInterface    $posts
  * @param Request                    $request
  * @param SettingRepositoryInterface $settings
  * @return \Illuminate\View\View
  */
 public function show(PostResolver $resolver)
 {
     if (!($post = $resolver->resolve())) {
         abort(404);
     }
     $this->dispatch(new MakePostResponse($post));
     $this->dispatch(new AddPostsBreadcrumb());
     if ($category = $post->getCategory()) {
         $this->dispatch(new AddCategoryBreadcrumb($category));
     }
     $this->dispatch(new AddPostBreadcrumb($post));
     return $post->getResponse();
 }
 /**
  * Show an existing post.
  *
  * @param PostRepositoryInterface    $posts
  * @param Request                    $request
  * @param SettingRepositoryInterface $settings
  * @return \Illuminate\View\View
  */
 public function show()
 {
     if (!($post = $this->resolver->resolve())) {
         abort(404);
     }
     $this->authorizer->authorize($post);
     $this->loader->load($post);
     $this->response->make($post);
     $this->http->cache($post);
     $this->dispatch(new AddPostsBreadcrumb());
     if ($category = $post->getCategory()) {
         $this->dispatch(new AddCategoryBreadcrumb($category));
     }
     $this->dispatch(new AddPostBreadcrumb($post));
     return view('anomaly.module.posts::posts/post', compact('post'));
 }