dev-master
9999999-devBootstrap alerts
MIT
The Requires
- php >=5.6
The Development Requires
by Andy Palmer
bootstrap alerts
v0.1.0
0.1.0.0Bootstrap alerts
MIT
The Requires
- php >=5.6
The Development Requires
by Andy Palmer
bootstrap alerts
Wallogit.com
2017 © Pedro Peláez
Bootstrap alerts
Bootstrap alert manager for PHP projects., (*2)
Add and display bootstrap alerts with relevant Font Awesome icons, (*3)
Use composer to add the package to your dependencies:, (*4)
composer require palmtree/bootstrap-alerts
Echoing the AlertManager class will invoke __toString() on each alert and return a concatenated string of HTML., (*5)
<?php
$alertManager = new \Palmtree\BootstrapAlerts\AlertManager();
$alertManager->addSuccess('It worked!');
$alertManager->addInfo('Did you know?');
$alertManager->addWarning('Make sure you did it right');
$alertManager->addError('Something went wrong!');
echo $alertManager;
You can also filter alerts:, (*6)
<?php
$alertManager = new \Palmtree\BootstrapAlerts\AlertManager();
$alertManager->addWarning('Make sure you did it right');
$alertManager->addError('Something went wrong!');
$alertManager->addError('Another thing went wrong!');
foreach($alertManager->getAlerts('error') as $errorAlert) {
echo $errorAlert;
}
Released under the MIT license, (*7)
Bootstrap alerts
MIT
bootstrap alerts
Bootstrap alerts
MIT
bootstrap alerts