Can a Relation manager use get actions?
I have a Resource for category and a relation for posts in that category, I want to create a generate button sort of like create button on the top right hand side.
I have this in my PostRelationsManager.php
8 Replies
I think this should work... are you running into any issues?
Sorry, I went too fast... you need to add your actions in
table()
, like a regular resource
ahh so that goes in the table part of it, let me give that a try
how would you go about getting the ID of the category that is currently being viewed
$this->ownerRecord
that seemed to do the trick thank you @pboivin
@pboivin one last question I have this action on My List Posts resource
How can I pass the id or model into the generate post method
Which id are you thinking about? The record for the current page?
This action has a form where they select the category, need to get the category ID into generatePost method
Ah, I see!
Something like this
ahhh perfect thank you