Reputation: 800
Hi I use paginate()
method for pagination it work fine, but a tag in blade
file have problem my link like this:
http://localhost/blog/admin/news/?page=2
and when i click on them i'm redirect :
http://localhost/admin/news?page=2
and get 404
error and when click link like this:
http://localhost/blog/admin/news?page=2
it's work fine. what the problem ?
Why when use http://localhost/blog/admin/news/?page=2
redirect me an other page?
thanks.
Upvotes: 1
Views: 66
Reputation: 4023
I had the same problem. You can use the setPath() method to choose the right path. You can see the usage of that method here http://laravel.com/docs/5.1/pagination#displaying-results-in-a-view
Upvotes: 1