I have a page that corresponds to a livewire composition with two tables and related paginate.
in app \ http \ livewire I have a file with the make function written like this:
$articoli = FatturaData::where(‘operazione’,’=’, $this->ordine_id)->paginate(19);
$articoli->setPageName(‘articoli’);
$gruppi = FatturaData::select(‘it_descrizione’, DB::raw(‘ANY_VALUE(id) AS id’), DB::raw(‘ANY_VALUE(voce_doganale) AS voce_doganale’))->where(‘operazione’,’=’, $this->ordine_id)->groupBy(‘it_descrizione’)->paginate(19);
$gruppi->setPageName(‘gruppi’);
return view(‘livewire.importa-fattura-manuale’, compact(‘articoli’,‘gruppi’))->layout(‘layouts.guest’);
then i have in resource \ livewire the blade page with the following code
Descrizione Uk | /tr>|||
---|---|---|---|
{{ $articolo->uk_descrizione }} | @else{{ $articolo->uk_descrizione }} |
Gruppi |
---|
{{ $gruppo->it_descrizione }} |
I can’t separate the functioning of the two paginators.
I tried to separate the two tables into two components, and import them into this using:
@livewire(table1)
@livewire(table2)
in this case I can have the separation of the two paginetor but I can no longer get the other features
I use the latest version of livewire
i can’t find an acceptable solution to fix the problem. I hope someone can give me an indication on how to solve the problem thanks.
Angelo