What seems to be the problem:
I want to pagination a DB query but getting an error.
Steps to Reproduce:
Functioning query with get().
$this->grid2 = DBName::where(‘field1’, $this->field1)
->where(‘field2’, $this->field2)
->where(‘field3’, $this->field3)
->orderBy(‘field3’, ‘ASC’)
->get();
But when I try to paginate:
$this->grid2 = DBName::where(‘field1’, $this->field1)
->where(‘field2’, $this->field2)
->where(‘field3’, $this->field3)
->orderBy(‘field3’, ‘ASC’)
->paginate(10);
This error shows up:
Livewire component’s [search] public property [grid2] must be of type: [numeric, string, array, null, or boolean]. Only protected or private properties can be set as other types because JavaScript doesn’t need to access them.
Are you using the latest version of Livewire:
yes
Do you have any screenshots or code examples:
As above.
Thanks for any help.