How to test a custom action?

In v2 this used to work
livewire(EditOrder::class, [
$order->getKey(),
])
->callPageAction('return');
livewire(EditOrder::class, [
$order->getKey(),
])
->callPageAction('return');
but in V3 it gives Method Illuminate\Http\Response::callPageAction does not exist. I changed callPageAction to runAction and now I'm getting Unable to call component method. Public method [return] not found on component
Solution:
Try callAction()
Jump to solution
3 Replies
Solution
Patrick Boivin
Patrick Boivin15mo ago
Try callAction()
Patrick Boivin
Patrick Boivin15mo ago
Just a thought - Using return for a method or variable name is possible but it's also a reserved keyword in PHP... not sure if this could be causing issues down the line
MiloudiMohamed
MiloudiMohamedOP15mo ago
Thanks! it worked
Want results from more Discord servers?
Add your server