widgetTable query

Hi I build a widget, and I only wanna show the last 5 rows of my table. I tried the limit in the query but it's not working.Keeps showing me everythig. public function table(Table $table): Table { return $table ->heading('Pedidos') ->description('Los últimos pedidos') ->query(Album::query()->latest('fecha')->limit(5))
Solution:
if you set the pagination to false it wil work
->paginated(false);
->paginated(false);
...
Jump to solution
3 Replies
Solution
Tally
Tally2mo ago
if you set the pagination to false it wil work
->paginated(false);
->paginated(false);
Tally
Tally2mo ago
the pagination is also doing some limiting internally
Barbaracrlp
Barbaracrlp2mo ago
okay,thanks a lot