From 23316deb422b8a7a9103573caa48a402f0552835 Mon Sep 17 00:00:00 2001 From: Khoubza Younes Date: Tue, 31 Aug 2021 03:00:41 +0100 Subject: [PATCH] fix template notification not showing with z-index --- composer.json | 1 + src/Laravel/Resources/config/config.php | 2 +- src/Laravel/helpers.php | 10 ++++++---- src/Symfony/DependencyInjection/Configuration.php | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index e5933add..e2479bed 100755 --- a/composer.json +++ b/composer.json @@ -21,6 +21,7 @@ }, "files": [ "src/Prime/helpers.php", + "src/Laravel/helpers.php", "src/Toastr/Laravel/Resources/functions/toastr.php", "src/Noty/Laravel/Resources/functions/noty.php", "src/Notyf/Laravel/Resources/functions/notyf.php", diff --git a/src/Laravel/Resources/config/config.php b/src/Laravel/Resources/config/config.php index a5ea99d6..18495a79 100644 --- a/src/Laravel/Resources/config/config.php +++ b/src/Laravel/Resources/config/config.php @@ -3,7 +3,7 @@ return array( 'default' => 'template', - 'root_script' => 'https://cdn.jsdelivr.net/npm/@flasher/flasher@0.1.6/dist/flasher.min.js', + 'root_script' => 'https://cdn.jsdelivr.net/npm/@flasher/flasher@0.1.8/dist/flasher.min.js', 'template_factory' => array( 'default' => 'tailwindcss', diff --git a/src/Laravel/helpers.php b/src/Laravel/helpers.php index 6ed1f4dc..e01cc39d 100644 --- a/src/Laravel/helpers.php +++ b/src/Laravel/helpers.php @@ -4,16 +4,18 @@ if (!function_exists('flasher')) { /** * @param string $message * @param string $type - * @param string $title * * @return \Flasher\Prime\Flasher */ - function flasher($message = null, $type = 'success', $title = '', array $options = array(), array $stamps = array()) + function flasher($message = null, $type = 'success', array $options = array(), array $stamps = array()) { + /** @var \Flasher\Prime\FlasherInterface $flasher */ + $flasher = app('flasher'); + if (null === $message && 0 === func_num_args()) { - return app('flasher.factory'); + return $flasher; } - return app('flasher.factory')->render($type, $message, $title, $options, $stamps); + return $flasher->with($stamps)->addFlash($type, $message, $options); } } diff --git a/src/Symfony/DependencyInjection/Configuration.php b/src/Symfony/DependencyInjection/Configuration.php index 08a877d1..b3d12b9e 100755 --- a/src/Symfony/DependencyInjection/Configuration.php +++ b/src/Symfony/DependencyInjection/Configuration.php @@ -25,7 +25,7 @@ final class Configuration implements ConfigurationInterface ->defaultValue('template') ->end() ->scalarNode('root_script') - ->defaultValue('https://cdn.jsdelivr.net/npm/@flasher/flasher@0.1.6/dist/flasher.min.js') + ->defaultValue('https://cdn.jsdelivr.net/npm/@flasher/flasher@0.1.8/dist/flasher.min.js') ->end() ->arrayNode('root_scripts') ->prototype('scalar')->end()