Skip to content

PHP code snippet – How to use sweetalert in laravel controller?

<script src=""></script>

$('.delete-confirm').on('click', function (event) {
    const url = $(this).attr('href');
        title: 'Are you sure?',
        text: 'This record and it`s details will be permanantly deleted!',
        icon: 'warning',
        buttons: ["Cancel", "Yes!"],
    }).then(function(value) {
        if (value) {
            window.location.href = url;
See also  How to generate randome number in Javacsirpt?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.