Infolist - send data to Action
Hi - I need some help on creating an Infolist-Action. As you can see on the screenshot, I have a Chekpoint that has multiple tags. When a user clicks on the red button, the tag is beeing removed from the checkpoint. Right now I have this code:
But
How do I send the tag-ID to the action? The relationship between Checkpoint -> Tag is BelongsToMany.
Thanks.
But
$tagcomes in as an empty model. If I use $data instead of $tag, I get an empty array. I already tried to use ->formFill(['tag_id' => $tag->id]), but to no avail. How do I send the tag-ID to the action? The relationship between Checkpoint -> Tag is BelongsToMany.
Thanks.

Solution
Try passing it to the function via
use ($tag). Filament doesn’t know about your tag so it can’t inject it as an argument