F
Filament10mo ago
Bloom

How to access the current data in edit page?

How can i get the current state of a data in edit page to be manipulated using mutateFormDataBeforeFill, i saw the below code on documentation but instead of auth()->id() i want to query data
protected function mutateFormDataBeforeFill(array $data): array
{
$data['user_id'] = auth()->id();

return $data;
}
protected function mutateFormDataBeforeFill(array $data): array
{
$data['user_id'] = auth()->id();

return $data;
}
1 Reply
Vp
Vp10mo ago
try $this->getRecord()
Want results from more Discord servers?
Add your server