Reusing a form using the form() function from a resource

Greetings, instead of having to have a function that returns an array with the components i.e. getFormSchema(), is it possible to add the form to an action just like in a relation manager as follows?
public function form(Form $form): Form
{
    return SubscriptionResource::form($form);
}


This is what I am currently doing
Tables\Actions\EditAction::make()
    ->form(UserResource::getFormSchema()),

If I do the following, I will have to click the action twice in order for the info or form to display
Tables\Actions\EditAction::make()
    ->form(fn ($form) => UserResource::form($form)),
Solution
Just create a method that returns the array of form components then call that method anywhere you need to use the form schema. I think you might be doubling up the form initialization.
Was this page helpful?