From 5c7f770e2007f1d22084275a9050a367be850c2d Mon Sep 17 00:00:00 2001 From: alexvenga Date: Sun, 11 Dec 2022 20:42:35 +0300 Subject: [PATCH] REgexp fix --- README.md | 5 +++++ src/LaravelSiteSettingsProvider.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index bc84816..87f3a1b 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,11 @@ You can use this package as default laravel config() function! } ``` +or Blade directive @lssconfig +```php + @lssconfig('group.setting') +``` + ## Usage with MoonShine Laravel Admin Please see [MoonShine](https://moonshine.cutcode.ru/) diff --git a/src/LaravelSiteSettingsProvider.php b/src/LaravelSiteSettingsProvider.php index dc5a1c6..719f8c6 100644 --- a/src/LaravelSiteSettingsProvider.php +++ b/src/LaravelSiteSettingsProvider.php @@ -2,6 +2,7 @@ namespace VI\LaravelSiteSettings; +use Illuminate\Support\Facades\Blade; use Illuminate\Support\ServiceProvider; use VI\LaravelSiteSettings\Models\LaravelSiteSetting; use VI\LaravelSiteSettings\Models\LaravelSiteSettingGroup; @@ -37,6 +38,10 @@ public function boot() } + Blade::directive('lssconfig', function (...$expression) { + return ""; + }); + LaravelSiteSetting::observe(LSSObserver::class); LaravelSiteSettingGroup::observe(LSSObserver::class);