public function show(Post $post) { $previous = Post::find($post->id - 1); $next = Post::find($post->id + 1); return View('posts.show', compact('post', 'previous', 'next')); }
public function single($id) { $side = Post::paginate(10); $post = Post::find($id); return view('posts/single', ['post' => $post, 'side' => $side]); }
public function post($id) { $post = Blog\Post::find($id); $posts = Blog\Post::all(['id', 'title']); return view('posts.post', compact(['post', 'posts'])); }