gizmojo's avatar

Overwrite pagination url path

How do you correctly use currentPathResolver?

https://test.local/blog?=2

Paginator::currentPathResolver(fn ($pageName = 'page') => $this->url . '?' . $pageName);

https://test.local/blog?page=&=2

Paginator::currentPathResolver(fn ($pageName = 'page') => $this->url);

Reason for this is because I need to overwrite the url path inside a livewire component.

Note that this is called currentPathResolver before Posts::query()->paginate() and not from a service provider.

0 likes
0 replies

Please or to participate in this conversation.