fixed comment

This commit is contained in:
vedatakdogan 2020-12-24 17:23:13 +03:00
parent ea959b25d1
commit e43ec4f57b

View File

@ -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));
} }
} }
} }