add laravel helpers and fix blade compiler for laravel 4

This commit is contained in:
KHOUBZA Younes
2021-04-25 10:09:31 +00:00
parent 798caa05af
commit ede7629f95
2 changed files with 25 additions and 0 deletions
+22
View File
@@ -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);
}
}
+3
View File
@@ -40,6 +40,9 @@
"psr-4": {
"Flasher\\Notyf\\Laravel\\": ""
},
"files": [
"Resources/functions/notyf.php"
],
"exclude-from-classmap": [
"/Tests/"
]