action method not working on a standalone Action
I have the following code and the
and the blade content is the following
actionaction method doesn't get executed.Action::make('addToCart')
->label('ADD PLAYERS TO CART')
->modalHeading('Add Players to Cart')
->modalWidth('2xl')
->modalSubmitActionLabel('Add Players to Cart')
->modalFooterActionsAlignment('end')
->form([
Select::make('existing_kids')
->label('Select existing kids information previously added')
->required()
->multiple()->options($this->getFamilyMembers()),
])->action(fn($data) => function () {
ray($this->form->getState());
});Action::make('addToCart')
->label('ADD PLAYERS TO CART')
->modalHeading('Add Players to Cart')
->modalWidth('2xl')
->modalSubmitActionLabel('Add Players to Cart')
->modalFooterActionsAlignment('end')
->form([
Select::make('existing_kids')
->label('Select existing kids information previously added')
->required()
->multiple()->options($this->getFamilyMembers()),
])->action(fn($data) => function () {
ray($this->form->getState());
});and the blade content is the following
{{ ($this->addToCartAction)(['productId'=>$item->id])}}{{ ($this->addToCartAction)(['productId'=>$item->id])}}