k3l
Disable Pagination in List of Widgets
Inside the getHeaderWidgets() function, I have a for that generates a different widget for each currency. I think because the function returns an array of widgets, it automatically sets up pagination.
I don't know how can I disable it and show all widgets
protected function getHeaderWidgets(): array
{
$organizationId = Auth::user()->organization_id;
$currencies = Currency::where('organization_id', $organizationId)->where('status', true)->get();
$widgets = []; foreach ($currencies as $currency) { $widgets[] = ProjectedRevenueResource\Widgets\ProjectionTable::make([ 'currencyId' => $currency->id, 'currencySymbol' => $currency->symbol ]); }
return $widgets; }
$widgets = []; foreach ($currencies as $currency) { $widgets[] = ProjectedRevenueResource\Widgets\ProjectionTable::make([ 'currencyId' => $currency->id, 'currencySymbol' => $currency->symbol ]); }
return $widgets; }
7 replies