PHP code example of wavey / sweetalert

1. Go to this page and download the library: Download wavey/sweetalert library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wavey / sweetalert example snippets


<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
@

use Wavey\Sweetalert\Sweetalert;

Sweetalert::basic('Description', 'Title');
Sweetalert::info('Description', 'Title');
Sweetalert::success('Description', 'Title');
Sweetalert::error('Description', 'Title');
Sweetalert::warning('Description', 'Title');
Sweetalert::message('Description', 'Title');
Sweetalert::message('Description <h2>Custom HTML</h2>', 'Title')->html();
shell
composer