-
Notifications
You must be signed in to change notification settings - Fork 209
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 Facade doesn't work! #115
Comments
same here. |
Are you importing the whole namespace for the facade? |
I used |
same here :( |
@mosi3883 Could you import the Facade using the whole namespace?
|
use UxWeb\SweetAlert\SweetAlert; use UxWeb\SweetAlert\SweetAlert; use SweetAlert; use Alert; use Alert; |
I decided to use main script and don't use packages so feel free to close this issue |
Facade and helper function usage are not related. If you want to use the facade just import it with:
If you want to use the helper function there's no need to import the Facade. Helper function is able to resolve the underlying service class. The case for
Then, the tip is that you can import a facade by it's Alias only if it's defined, otherwise you need to import the facade using it's FQN (fully qualified name). |
Hi. Thanks for the clarification.
This doesnt work. We do have
in our config/app.php and have been using Alert::message all these while. I reverted back to 2.0.1 in the mean time. Thanks for your hard work. |
im facing same problem, alert helper function works but facade doesnot work. im using laravel 8. Please any suggestion, why its behaving like this? |
use Auth; Alert()->success('Message', 'Optional title'); |
It seems to be broken. I'm sorry, right I don't have the time to invest in this project, but you can send a pull request to fix it. Thanks |
The main problem is that time ago I added a Maybe the way to fix it is to call the |
when I'm using
alert()->message('Message', 'Optional Title');
it's work
but when I'm using
Alert::message('Message', 'Optional Title');
it's not working
the session doesn't contain any sweet alert data When I'm using Facade
No error on Laravel
no error on console
The text was updated successfully, but these errors were encountered: