Resource, custom page with widgets, how to sent the $record ?

Hey guys,

I've created a custom page on a Resource, but on the widgets I would like to get the record, do you know how to do it ?

class ChartOrganization extends Page
{
    protected static string $resource = OrganizationResource::class;

    protected static string $view = 'filament.resources.organization-resource.pages.chart-organization';

    public ?Organization $record;

    protected function getHeaderWidgets(): array
    {
        return [
            OrganizationResource\Widgets\QuotaWidget::class, // $this->record is null inside the widget.
        ];
    }
}
Was this page helpful?