Passing data to custom page through table action.

Hi, I'm trying to pass the current record to a custom page on a table action, however I can't seem to get the data. Here's my setup:

Layer resource, table actions:

->actions([
                Tables\Actions\EditAction::make(),
                Tables\Actions\Action::make('draw')
                    ->label('Draw')
                    ->url(fn (Layer $record): string => route('filament.resources.layers.draw', ['record' => $record]))
            ])


Draw custom page blade view:

<x-filament::page>
    <div id="map">
        @dd($record)
    </div>
</x-filament::page>


Error:
Undefined variable $record
.

I can't find much on the docs. Any clues as to what might be going wrong?
Was this page helpful?