mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 06:46:08 -06:00
fixed comment
This commit is contained in:
parent
ea959b25d1
commit
e43ec4f57b
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use Anomaly\SettingsModule\Setting\Form\SettingFormRepository;
|
use Anomaly\SettingsModule\Setting\Form\SettingFormRepository;
|
||||||
use Anomaly\Streams\Platform\Ui\Form\Event\FormWasSaved;
|
use Anomaly\Streams\Platform\Ui\Form\Event\FormWasSaved;
|
||||||
|
use Illuminate\Support\Facades\Artisan;
|
||||||
|
|
||||||
class EnableMaintenanceMode
|
class EnableMaintenanceMode
|
||||||
{
|
{
|
||||||
@ -9,12 +10,9 @@ class EnableMaintenanceMode
|
|||||||
public function handle(FormWasSaved $event)
|
public function handle(FormWasSaved $event)
|
||||||
{
|
{
|
||||||
$builder = $event->getBuilder();
|
$builder = $event->getBuilder();
|
||||||
|
|
||||||
if (get_class($builder->getRepository()) === SettingFormRepository::class) {
|
if (get_class($builder->getRepository()) === SettingFormRepository::class) {
|
||||||
if ($builder->getFormValues()->has('maintenance') and $builder->getFormValues()->get('maintenance')) {
|
if ($builder->getFormValues()->has('maintenance') and $builder->getFormValues()->get('maintenance')) {
|
||||||
file_put_contents(storage_path('framework/down'),
|
Artisan::call('down');
|
||||||
json_encode(['time' => '', 'retry' => null, 'message' => null],
|
|
||||||
JSON_PRETTY_PRINT));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user