Custom Action
What I am trying to do:
I am trying to create a custom action like the AssociateAction however I want to customize it on my own form.
What I did:
I tried following this
https://filamentphp.com/docs/3.x/actions/modals#modal-forms, specifically this part
I've changed the $record into $post and the author() into just
My issue/the error:
if I kept the
Call to undefined method App\Models\Equipment::user_id()
changing it into
Code:
Ignore the other headerActions like AssociateAction and 'Borrow'
Thank you !!!!
I am trying to create a custom action like the AssociateAction however I want to customize it on my own form.
What I did:
I tried following this
https://filamentphp.com/docs/3.x/actions/modals#modal-forms, specifically this part
I've changed the $record into $post and the author() into just
->user_id and right now I am testing it ->associate(1) by just passing an int to see if it works.My issue/the error:
if I kept the
$post-user_id()->associate(1) i get the error BadMethodCall Call to undefined method App\Models\Equipment::user_id()
changing it into
post-user_id->associate(1) i get the error Call to a member function associate() on nullCode:
Ignore the other headerActions like AssociateAction and 'Borrow'
Thank you !!!!