© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
14 replies
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']),
        ];
    }
}
<?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
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

New widget not working
FilamentFFilament / ❓┊help
3y ago
Table Widget hidden() not working
FilamentFFilament / ❓┊help
3y ago
Filtering Widget Data is Not Working
FilamentFFilament / ❓┊help
3y ago
page filters not working on table widget
FilamentFFilament / ❓┊help
8mo ago