PHP code example of arkraft / alerts

1. Go to this page and download the library: Download arkraft/alerts 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/ */

    

arkraft / alerts example snippets


'Arkraft\Alerts\AlertsServiceProvider'

'Alerts' => 'Arkraft\Alerts\Alerts',

php artisan asset:publish --path="vendor/arkraft/alerts/src/public/" jquery

php artisan config:publish arkraft/alerts

return array(
    'offset' => '{from: "top", amount: 40}',
    'align' => 'right',
    'width' => 250,
    'delay' => 4000,
    'allowDismiss' => false,
    'stackupSpacing' => 5
);

Alerts::addDanger("This is a simple error message", "Error", array("delay" => 0, "allowDismiss" => true, "align" => "center"));