Custom Page Table Method Edit Action passing Current Record

Hello, Is it possible to pass current record within view on custom filament page under table method?
->actions([
EditAction::make()
->modalHeading('Edit Location')
->modalSubmitActionLabel('Save Changes')
->successNotificationTitle('Location updated successfully')
->view('filament.pages.user-data.location-edit')
,
])
->actions([
EditAction::make()
->modalHeading('Edit Location')
->modalSubmitActionLabel('Save Changes')
->successNotificationTitle('Location updated successfully')
->view('filament.pages.user-data.location-edit')
,
])
I have tried accessing $record within view I get
Filament\Tables\Actions\EditAction::record(Illuminate\Database\Eloquent\Model|Closure|null $record): static {#4610 ▼ // resources\views/filament/pages/user-data/location-edit.blade.php
returnType: "static"
this:
Filament\Tables\Actions
\
EditAction {#2858 …}
}
Filament\Tables\Actions\EditAction::record(Illuminate\Database\Eloquent\Model|Closure|null $record): static {#4610 ▼ // resources\views/filament/pages/user-data/location-edit.blade.php
returnType: "static"
this:
Filament\Tables\Actions
\
EditAction {#2858 …}
}
Also closure funciton within view do not work... Any idea how to pass current record?
2 Replies
LeandroFerreira
{{ $getRecord() }} ?
SuperUserDo
SuperUserDoOP3w ago
Thanks a lot! I was starting to go deep within {{ $this }}, to figure that one out..

Did you find this page helpful?