F
Filament9mo ago
nowak

Avoid showing table widget on main dashboard

I have created a table widget which has this setup:
<?php

namespace App\Filament\Widgets;

use App\Filament\Resources\GroupOrderResource;
use App\Models\GroupOrder;
use Carbon\Carbon;
use Illuminate\Support\Str;
use Filament\Tables;
use Filament\Tables\Table;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Columns\TextInputColumn;
use Filament\Tables\Columns\SelectColumn;
use Filament\Tables\Actions\Action;
use Filament\Widgets\TableWidget as BaseWidget;

class UpcomingGroupOrders extends BaseWidget
{
// table code
}
<?php

namespace App\Filament\Widgets;

use App\Filament\Resources\GroupOrderResource;
use App\Models\GroupOrder;
use Carbon\Carbon;
use Illuminate\Support\Str;
use Filament\Tables;
use Filament\Tables\Table;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Columns\TextInputColumn;
use Filament\Tables\Columns\SelectColumn;
use Filament\Tables\Actions\Action;
use Filament\Widgets\TableWidget as BaseWidget;

class UpcomingGroupOrders extends BaseWidget
{
// table code
}
I have also made my own dashboard page, where I include the table widget like this:
protected function getHeaderWidgets(): array
{
return [
UpcomingGroupOrders::class,
];
}
protected function getHeaderWidgets(): array
{
return [
UpcomingGroupOrders::class,
];
}
The issue is that my table widget is also shown on the main Dashboard page, which is not what I want. Is it possible to create a table widget that isn't shown on the main Dashboard page?
Solution:
Move the widget to a different location so it’s not auto discovered then you can manually include it where you need to.
Jump to solution
2 Replies
Solution
awcodes
awcodes9mo ago
Move the widget to a different location so it’s not auto discovered then you can manually include it where you need to.
nowak
nowakOP9mo ago
Thank you @awcodes !
Want results from more Discord servers?
Add your server