Render data from two resources in the same form
Is there a way to render data in a form from two different resources (tables or models) without a relationship between them? Thanks
4 Replies
protected function mutateFormDataBeforeFill(array $data): array
{
$data['user_id'] = auth()->id();
return $data;
}
If you're using modal you can use this https://filamentphp.com/docs/3.x/actions/prebuilt-actions/edit#customizing-data-before-filling-the-form
thanks