pageName won't work I'm trying to add a pagination name to my Eloquent Query, but its still "page" in the query.
$this->user->groupsMember()->orderBY('user_updated_at','DESC')->paginate(20,['*'],'groupsWidgetMember');
What's wrong?
How are you checking the link?
@Sinnbeck by clicking it.
//Lets assume the variable is $groups...
@if($groups->haspages())
<div>
{{$groups->links()}}
</div>
@endif
...the links are created and clickable. ?page=x is beeing added to the query.
The result doesn't change.
You've put this as a Livewire question. How is the paginator name relevant ?
@snapey I'm using multiple components that use pagination links.
...it works without the pagination parameters:
$this->user->groupsMember()->orderBY('user_updated_at','DESC')->paginate(20);
But it still appends '?page=123' to the query string.
Can I prevent to built up a query string using livewire somehow?
I know there is this property
protected $queryString = [
'page' => ['except' => 1, 'as' => 'p'],
];
Does it has any options to prevent appending the ?page to the current url in the browser?
Yes - it's setting the correct name, I also figured out (see my last post).
Can I hide the '?page=X' somehow? It's beeing hidden when used "except" for the page number that follows ahead e.g "1".
Please sign in or create an account to participate in this conversation.