Skip to content

Commit

Permalink
REgexp fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvenga committed Dec 11, 2022
1 parent 8a82ac5 commit 5c7f770
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)

Expand Down
5 changes: 5 additions & 0 deletions src/LaravelSiteSettingsProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -37,6 +38,10 @@ public function boot()

}

Blade::directive('lssconfig', function (...$expression) {
return "<?php echo lssconfig($expression); ?>";
});

LaravelSiteSetting::observe(LSSObserver::class);
LaravelSiteSettingGroup::observe(LSSObserver::class);

Expand Down

0 comments on commit 5c7f770

Please sign in to comment.