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

Return Redirect on Middleware not showing Error type #145

Closed
rohi1386 opened this issue Dec 19, 2022 · 3 comments
Closed

Return Redirect on Middleware not showing Error type #145

rohi1386 opened this issue Dec 19, 2022 · 3 comments

Comments

@rohi1386
Copy link

  • Package Version: #.#.#
  • Laravel Version: #.#.#

Description:

After following the documentation, when returning/redirecting from middleware the error type does not show the sweetalert. I tried with types success, info, question and warning, they all work.
Steps To Reproduce:

Setup middleware and add ->with('warning', 'Whoops!'); to the return or redirect. It does not show the sweetalert. Test again using ->with('info', 'Whoops!'); and it does work.

(Disclaimer, I am a new to php and laravel so I may be missing something)

Steps To Reproduce:

@realrashid
Copy link
Owner

Hey @rohi1386,

Please try the below command.

composer dump-autoload 

OR

php artisan cache:clear

@rohi1386
Copy link
Author

Thanks but it didn't work

@mohamedds-12
Copy link
Contributor

mohamedds-12 commented Mar 5, 2023

It happend to me too, I even tried alert('title', 'description', 'type')... but nothing.
One thing worked though, after using the Sweet-alert's middlware to convert the session messages into alerts, I just did
session()->flash('success', 'Successfully worked!') AND IT WORKED.
But that's still not what I'm looking for because using the session you can't set the description of the alert, you're only limited to the title and 'type', I'd be happy if someone could get it to work.

realrashid added a commit that referenced this issue Apr 20, 2023
…emes selection option closed #154 closed #145 Merge pull request #151
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

3 participants