Beispiel #1
0
 public function post()
 {
     $post = Larablog::post();
     if (!$post) {
         return self::notfound();
     }
     if ($post->type === 'redirect') {
         return Redirect::to($post->meta->redirect_to, 301);
     }
     $post->increment('views_count');
     if ($post->type === 'page') {
         return self::page($post);
     }
     return view('larablog::themes.master', ['view' => lb_view('post.show'), 'post' => $post, 'series' => Larablog::series(), 'top' => Larablog::top(), 'related' => Larablog::related($post)]);
 }