how would I go about getting the next and previous post having in mind that I'm on the post detail page.
I know the logic would be to pick the current post id from here:
$post = $this->posts->findBySlug($slug);
and then get the next and previous one using something like:
$next = DB::table('posts')->where('id', '>', $post->id)->get(); $previous = DB::table('posts')->where('id', '<', $post->id)->get();
but somehow this is not working. :-(