Esempio n. 1
0
 /**
  * Show post details
  * 
  * @param  string $sectionPermalink
  * @param  string $categoryPermalink
  * @param  string $postPermalink
  * 
  * @return Response
  */
 public function show($sectionPermalink, $categoryPermalink, $postPermalink)
 {
     $post = Post::details($postPermalink);
     $relatedPosts = Post::related($post->id, $post->category_id)->get();
     return view('public.posts.show', compact('post', 'relatedPosts'));
 }
Esempio n. 2
0
 /**
  * Display post details
  *
  * @param  string $permalink
  * @param  Request $request
  * @return Response
  */
 public function postDetails($permalink, Request $request)
 {
     $variables = ['post' => Post::details($permalink)->with('tags')->first(), 'page' => 'blog', 'categories' => Category::PostsCategories(), 'tags' => Tag::PostTags(), 'sponsors' => Sponsor::PublicSponsors(), 'path' => $request->segments()];
     return view('public.blog.post-details', $variables);
 }