PHP code example of hieu-le / laravel-alert

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

    

hieu-le / laravel-alert example snippets


'HieuLe\Alert\AlertServiceProvider',

'Alert' => 'HieuLe\Alert\Facades\Alert',

Alert::success($message);
# or
Alert::info($message);
# or
Alert::warning($message);
# or
Alert::error($message);

Alert::flash()

// In each view, there is a special variable call $errors
// This is the validation errors that is set by calling "withError" method as
// guided at http://laravel.com/docs/4.2/validation#error-messages-and-views

echo Alert::dump($errors->all()); 

php artisan config:publish hieu-le/laravel-alert