FilamentF
Filament2y ago
Mina

Widget getColumns not working

So, I've made a custom dashboard that has widgets. My issue is, it's not overwriting the default getcolumns() method. I want to have 3 widgets in a row (or more). this is my code:
<?php namespace App\Filament\Pages; use App\Filament\Resources\FunnelResource\Widgets\FunnelOverview; use App\Filament\Resources\ShopResource\Widgets\ShopOverview; class Dashboard extends \Filament\Pages\Dashboard { public function getColumns(): int | string | array { return 3; } public function getHeaderWidgets(): array { return [ ShopOverview::class, FunnelOverview::make(['title' => 'Total Funnels']), FunnelOverview::make(['title' => 'Total Active Funnels']), FunnelOverview::make(['title' => 'Total Draft Funnels']), FunnelOverview::make(['title' => 'Total Paused Funnels']), ]; } }
I've put the image of how it is looking, the widgets have colspan set to 1. Please help I am at total loss here
Screenshot_2024-03-27_at_11.34.51.png
Was this page helpful?