PHP code example of azenox / flashmcqueen
1. Go to this page and download the library: Download azenox/flashmcqueen 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/ */
azenox / flashmcqueen example snippets
use AzenoX\FlashMcQueen;
if(!session_id())
session_start();
$flash = new FlashMcQueen();
$flash->success("A Success Message", true, [], true);
$flash->error("An Error Message");
$flash->warning("A Warning Message");
$flash->info("An Informational Message");
$flash->custom("Am a Fish", '<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd"><path d="M21 11c0-.552-.448-1-1-1s-1 .448-1 1c0 .551.448 1 1 1s1-.449 1-1m3 .486c-1.184 2.03-3.29 4.081-5.66 5.323-1.336-1.272-2.096-2.957-2.103-4.777-.008-1.92.822-3.704 2.297-5.024 2.262.986 4.258 2.606 5.466 4.478m-6.63 5.774c-.613.255-1.236.447-1.861.573-1.121 1.348-2.796 2.167-5.287 2.167-.387 0-.794-.02-1.222-.061.647-.882.939-1.775 1.02-2.653-2.717-1.004-4.676-2.874-6.02-4.287-1.038 1.175-2.432 2-4 2 1.07-1.891 1.111-4.711 0-6.998 1.353.021 3.001.89 4 1.999 1.381-1.2 3.282-2.661 6.008-3.441-.1-.828-.399-1.668-1.008-2.499.429-.04.837-.06 1.225-.06 2.467 0 4.135.801 5.256 2.128.68.107 1.357.272 2.019.495-1.453 1.469-2.271 3.37-2.263 5.413.008 1.969.773 3.799 2.133 5.224"/></svg>', '#00BCD4', true);
$flash->display();
$flash->success(string $msg, bool $persistent = false, array $delays = [], bool $floatingIcon = false);
$flash->error(string $msg, bool $persistent = false, array $delays = [], bool $floatingIcon = false);
$flash->warning(string $msg, bool $persistent = false, array $delays = [], bool $floatingIcon = false);
$flash->info(string $msg, bool $persistent = false, array $delays = [], bool $floatingIcon = false);
$flash->custom(string $msg, string $icon, string $color, bool $persistent = false, array $delays = [], bool $floatingIcon = false);