PHP code example of marqu3s / yii2-sweet-alert
1. Go to this page and download the library: Download marqu3s/yii2-sweet-alert 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/ */
marqu3s / yii2-sweet-alert example snippets
echo Alert::widget();
echo Alert::widget([
'useSessionFlash' => false,
'options' => [
'title' => 'Success message',
'type' => 'Success',
'text' => "You will not be able to recover this imaginary file!",
'confirmButtonText' => "Yes, delete it!",
'cancelButtonText' => "No, cancel plx!"
]
]);
php composer.phar