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

How to usilise the swal() function in the latest version? #96

Closed
PilloryBarnDesign opened this issue Aug 5, 2020 · 1 comment
Closed

Comments

@PilloryBarnDesign
Copy link

  • Package Version: 3.1.6
  • Laravel Version: 7.23.0

Description:

I used the original version of this package years ago, and in order to do custom alerts we could utilise the swal() function, which was usually set up like this at the footer of app.blade.php

    @if (alert()->ready())
    <script>
        swal({
            title: "{!! alert()->message() !!}",
            text: "{!! alert()->option('text') !!}",
            type: "{!! alert()->type() !!}",
            @if(alert()->option('timer'))
            timer: {!! alert()->option('timer') !!},
            showConfirmButton: false,
            @endif
        });
    </script>
    @endif

However, when using this code now it just produces an error: Error Call to undefined method RealRashid\SweetAlert\Toaster::ready() and I cannot see anything in the docs about using this. Can someone help me out at all please?

Thank you,

Andy

@PilloryBarnDesign
Copy link
Author

Didn't realise this had been rolled in now and I just had to change my implementation elsewhere

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

1 participant