Using Laravel 8 I am creating an array with custom data to send to a named view. The pagination works for page 1 but when I try to go to page 2 I am redirected to /?=page2 instead of /view?=page2. I tried using $data->path('') as well as $data->path('view') but I am still being redirected to /?=page2. Any suggestions?
thats good. but you query on all data.
thanks, it worked for me using "withPath" in place of "path". in Laravel 8
Good to know it helped 👍
Hello. Thank you for the lesson. How to add sorting in paginator!?
How to do a search in that array?
Using Laravel 8 I am creating an array with custom data to send to a named view. The pagination works for page 1 but when I try to go to page 2 I am redirected to /?=page2 instead of /view?=page2. I tried using $data->path('') as well as $data->path('view') but I am still being redirected to /?=page2. Any suggestions?
Thanks for writing in. Hard to answer can you share your code. I will try to answer after watching it. Thanks
use $data->withPath('view') in your case.
@@mohamadfarhanbinmohdfauzi2962 thank you i did it
@@mohamadfarhanbinmohdfauzi2962 i haved same problem but with your suggestion i fix it, thanks