Do you by chance have a @foreach() in your news.index file? If so can you post that code?
Aug 21, 2014
5
Level 30
Pagination
In my Controller i have
$news = News::paginate(15);
return View::make('news.index', compact('news'));
This is working, i get only 15 results. ?page=3 etc. is also working.
But if i want to display the pagination links on the bottom i get an error
In my View i have
{{ $news->links() }}
The error i`m getting is
Call to undefined method Illuminate\Database\Query\Builder::links() (View: /home/vagrant/code/news/app/views/news/index.blade.php)
Please or to participate in this conversation.