-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Call to undefined method RealRashid\SweetAlert\Toaster::add() #55
Comments
Hey @Shipu is your project on GitHub then share the repo i will check what's wrong because i just test out with fresh Laravel 6.4 everything working perfectly. Why not run composer dump-autoload command in your project? |
close due to inactivity! |
@if (alert()->ready()) I got this Error . Error |
After installing the sweet-alert package, register the service provider
RealRashid\SweetAlert\SweetAlertServiceProvider::class,
Copy to clipboardErrorCopied
in your config/app.php configuration file:
'providers' => [
/*
* Package Service Providers...
*/
RealRashid\SweetAlert\SweetAlertServiceProvider::class,
],
Copy to clipboardErrorCopied
Also, add the Alert facade to the aliases array in your app configuration
file:
'Alert' => RealRashid\SweetAlert\Facades\Alert::class,
…On Wed, Dec 22, 2021, 10:08 PM Kashif Sandhu ***@***.***> wrote:
@if <https://github.com/if> (alert()->ready())
<script>
swal({
title: "{!! alert()->message() !!}",
text: "{!! alert()->option('text') !!}",
type: "{!! alert()->type() !!}",
@if <https://github.com/if>(alert()->option('timer'))
timer: {!! alert()->option('timer') !!},
showConfirmButton: false,
@endif <https://github.com/endif>
});
</script>
@endif <https://github.com/endif>
I got this Error .
Error
Call to undefined method RealRashid\SweetAlert\Toaster::ready()
—
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADXCPBN7YRHOUXQHCCCCPUDUSIAXVANCNFSM4JGOT6WQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
After adding providers and aliases you need to go through the following steps first include the sweet alert under the script tag publish the Sweet Alert file |
Description:
Call to undefined method RealRashid\SweetAlert\Toaster::add()
Steps To Reproduce:
always show this 500 error
The text was updated successfully, but these errors were encountered: