F
Filament15mo ago
Hugo

How to use ListRecords table as headerWidget for another resource ?

Hi, I have an "ActivitySessionResource" resource and an "ActivityResource" resource, and I'd like to put the "ActivitySessionResource" table in the headerWidget of the "ActivityResource" resource. Can you help me ?
class ListActivities extends ListRecords
{
protected static string $resource = ActivityResource::class;

protected ?string $heading = 'Formations et Activités';

protected function getActions(): array
{
return [
Actions\CreateAction::make()
->label('Nouvelle Formation'),
];
}

protected function getHeaderWidgets(): array
{
return [
// put here ListActivitySessions table
];
}
}
class ListActivities extends ListRecords
{
protected static string $resource = ActivityResource::class;

protected ?string $heading = 'Formations et Activités';

protected function getActions(): array
{
return [
Actions\CreateAction::make()
->label('Nouvelle Formation'),
];
}

protected function getHeaderWidgets(): array
{
return [
// put here ListActivitySessions table
];
}
}
Thanks for your help
1 Reply
ZedoX
ZedoX15mo ago
Use a table widget
Want results from more Discord servers?
Add your server