Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert or toast doesn't show up #86

Closed
maicol07 opened this issue Jun 4, 2020 · 2 comments
Closed

Alert or toast doesn't show up #86

maicol07 opened this issue Jun 4, 2020 · 2 comments

Comments

@maicol07
Copy link

maicol07 commented Jun 4, 2020

  • Package Version: 3.1.4
  • Laravel Version: 7.13.0

Description:

When login fails, alert is not showing up

Steps To Reproduce:

  1. Install Laravel Auth
  2. Override the sendFailedLoginResponse method in the login controller with this one:
protected function sendFailedLoginResponse(Request $request)
 {
     return back()->with('toast_error', trans('auth.failed'));
 }
  1. Try to register
  2. Fail the login (wrong user/psw)
@realrashid
Copy link
Owner

Hey @maicol07 ,
Sad to heard about the issue.

Can you please tell the step have to you done?

Have you added \RealRashid\SweetAlert\ToSweetAlert::class, into the $middlewareGroups of your app/Http/Kernel.php file and also have you set the SWEET_ALERT_AUTO_DISPLAY_ERROR_MESSAGES variable to your .env file and value to be true to activate the automatic displaying for the validation error messages.

Let me know if the above step didn't helped you.

@maicol07
Copy link
Author

I've solved some days ago but I've forgotten the fix 😅

Anyway, this is solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants