Laravel determine which controller returned error , laravel breeze

90 Views Asked by At

I'm using laravel breeze and I have two popups modals in the header, one for login and one for signup, when an authentication error occurs I want to: A) open the modal responsible and B) show the error in the correct modal, any ideas?

1

There are 1 best solutions below

0
On

I solved it using $request->validateWithBag instead of $request->validate and checked for the "Bag" in script section with $errors->nameOfBag->has('email') and it worked as needed