I think it's :
{!! $all['all']->links() !!}
But I cant see your controller...
I have 15 posts in my blogposts database and I want laravel to show 5 of them on page (would take 3 pages) in total.
But both the query and pagination don't work.
For some reason, the query returns only 4 items and the pagination doesn't work at all (even though pagination cuts the items selected when I specify how many)
$data = DB::table('blogposts')
->select('*')
->join('blogcategories', 'blogposts.postid', '=', 'blogcategories.id')
->paginate(5);
@foreach ($all['all'] as $post)
<table class="table">
<tr>
<td>
<tr><th><h2><kbd><font color='lime'>{{ $post->postname }}</font></kbd></h2>
<kbd><font color='cyan'>{{ $post->postdate }}</font></kbd>
<kbd><font color='red'>{{ $post->catname }}</font></kbd></th></tr>
<tr><td><blockquote><font color='gray'>{{ mb_substr($post->postdesc, 0,120,'UTF-8') }}</font>
<a href="{{ URL::to('/posts/').'/'.$post->postid }}">read more</a></blockquote>
</td>
</tr>
</table>
@endforeach
{!! $post->render() !!}
@stop
What am I doing wrong? Do I need to include something for pagination to work (though following the documentation, I see nothing like that)
yes , as expected its the join that's wrong
$data = DB::table('blogposts')
->select('*')
->join('blogcategories', 'blogposts.postcatid', '=', 'blogcategories.id')
->paginate(5);
Please or to participate in this conversation.