Action doesnt open the confirmation modal before going to new page

Greetings, i have an action called 'attemptQuiz'. when user click on the attempt button, it is supposed to open the confirmation modal first. everything is ok until i use the url() method, which it directly go to the url without opening the confirmation modal.
3 Replies
gizmojo
gizmojo16mo ago
You could redirect using livewire at the end of your action:
->action(function($livewire...) {
...
$livewire->redirect(QuizResource::getURL());
->action(function($livewire...) {
...
$livewire->redirect(QuizResource::getURL());
Dennis Koch
Dennis Koch16mo ago
You cannot combine url() and action(). Use a redirect as @gizmojo suggested
black ka1ser
black ka1ser16mo ago
okay thanks