custom page form from resource
hi just want abit of advice i've added the element to my custom page:
and my custom page implements
hasforms
and use interactWithForms
instead of creating a whole chunk of code in the Page like, which render fine ... :
can i pull the form from my resource?6 Replies
try
return YourResource::form($form);
thanks, this did work:
im already pulling
protected static string $resource = PerformanceResource::class;
in the page class, is there away to use this?what didn't work?
huh? what you suggested did work by returning
YourResource::form($form);
in the public function form(Form $form)
i was just curious if i could use the defined resouce already in my page rather then pulling it again :)ahh ok, try
return static::$resource::form($form);
ah yeah of course! perfect, thanks!
i am wondering why it just doesnt pick it up form $resource since this is pointing to it 🧐 keeping the code abit cleaner