Added new blade directive moduleIsEnabled and module_is_enabled helper function.

This commit is contained in:
Cüneyt Şentürk
2023-05-18 14:23:21 +03:00
parent 4bc8dc08fb
commit 2123bf34cf
2 changed files with 19 additions and 0 deletions

View File

@ -29,6 +29,10 @@ class Blade extends ServiceProvider
return "<?php echo show_widget($expression); ?>";
});
Facade::directive('moduleIsEnabled', function ($expression) {
return "<?php echo module_is_enabled($expression); ?>";
});
Facade::if('readonly', function () {
return config('read-only.enabled');
});