Support the ongoing development of Laravel.io →
Configuration Views Blade

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.

Last updated 3 years ago.
0

try this in ypur view


{!! str_replace('/?','?', $variable->render()) !!}

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.