You've already forked php-flasher
mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-04-05 12:32:55 +01:00
add laravel helpers and fix blade compiler for laravel 4
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Flasher\Prime\Notification\NotificationInterface;
|
||||
use Illuminate\Support\Facades\App;
|
||||
|
||||
if (! function_exists('notyf')) {
|
||||
/**
|
||||
* @param string $message
|
||||
* @param string $type
|
||||
* @param array $options
|
||||
*
|
||||
* @return \Flasher\Notyf\Prime\NotyfFactory
|
||||
*/
|
||||
function notyf($message = null, $type = NotificationInterface::TYPE_SUCCESS, array $options = array())
|
||||
{
|
||||
if (null === $message) {
|
||||
return App::make('flasher.notyf');
|
||||
}
|
||||
|
||||
return App::make('flasher.notyf')->addFlash($type, $message, $options);
|
||||
}
|
||||
}
|
||||
@@ -40,6 +40,9 @@
|
||||
"psr-4": {
|
||||
"Flasher\\Notyf\\Laravel\\": ""
|
||||
},
|
||||
"files": [
|
||||
"Resources/functions/notyf.php"
|
||||
],
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user