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))
3 Replies
Solution
if you set the pagination to false it wil work
the pagination is also doing some limiting internally
okay,thanks a lot