added read-only
mode #28nd2px
This commit is contained in:
@ -24,6 +24,10 @@ class Blade extends ServiceProvider
|
||||
Facade::directive('widget', function ($expression) {
|
||||
return "<?php echo show_widget($expression); ?>";
|
||||
});
|
||||
|
||||
Facade::if('readonly', function () {
|
||||
return config('read-only.enabled');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -48,6 +48,10 @@ class Event extends Provider
|
||||
'Illuminate\Auth\Events\Logout' => [
|
||||
'App\Listeners\Auth\Logout',
|
||||
],
|
||||
//'Illuminate\Console\Events\ScheduledTaskStarting' => [
|
||||
'Illuminate\Console\Events\CommandStarting' => [
|
||||
'App\Listeners\Common\SkipScheduleInReadOnlyMode',
|
||||
],
|
||||
'App\Events\Auth\LandingPageShowing' => [
|
||||
'App\Listeners\Auth\AddLandingPages',
|
||||
],
|
||||
|
@ -66,6 +66,11 @@ class ViewComposer extends Provider
|
||||
View::composer(
|
||||
'layouts.wizard', 'App\Http\ViewComposers\Wizard'
|
||||
);
|
||||
|
||||
View::composer(
|
||||
['partials.admin.content'],
|
||||
'App\Http\ViewComposers\ReadOnlyNotification'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user