Apr 7, 2025
0
Level 6
Is it possible to show/display widgets in relation manager?
The case is I want to make a relation manager called Store Performance to display widgets instead of table
I tried this but not working
<?php
namespace App\Filament\Admin\Resources\MerchantResource\RelationManagers;
use App\Filament\Admin\Widgets\MerchantStats;
use App\Filament\Admin\Widgets\ProductsAvailed;
use App\Filament\Admin\Widgets\SalesChart;
use Filament\Resources\RelationManagers\RelationManager;
class StorePerformanceRelationManager extends RelationManager
{
protected static string $relationship = 'transactions';
protected static ?string $title = 'Store Performance';
protected static ?string $label = 'Store Performance';
protected static ?string $pluralLabel = 'Store Performance';
protected function getHeaderWidgets(): array
{
return [
MerchantStats::class,
ProductsAvailed::class,
SalesChart::class,
];
}
public function getHeaderWidgetsColumns(): array
{
return [
'md' => 2,
'xl' => 3,
];
}
}
Please or to participate in this conversation.