mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 23:36: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\Streams\Platform\Ui\Form\Event\FormWasSaved;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
class EnableMaintenanceMode
|
||||
{
|
||||
@ -9,12 +10,9 @@ class EnableMaintenanceMode
|
||||
public function handle(FormWasSaved $event)
|
||||
{
|
||||
$builder = $event->getBuilder();
|
||||
|
||||
if (get_class($builder->getRepository()) === SettingFormRepository::class) {
|
||||
if ($builder->getFormValues()->has('maintenance') and $builder->getFormValues()->get('maintenance')) {
|
||||
file_put_contents(storage_path('framework/down'),
|
||||
json_encode(['time' => '', 'retry' => null, 'message' => null],
|
||||
JSON_PRETTY_PRINT));
|
||||
Artisan::call('down');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user