all(); $tabs = TabManager::get('settings'); return view('setting::admin.settings.edit', compact('settings', 'tabs')); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function update(UpdateSettingRequest $request) { $this->handleMaintenanceMode($request); setting($request->except('_token', '_method')); return redirect(non_localized_url()) ->with('success', trans('setting::messages.settings_have_been_saved')); } private function handleMaintenanceMode($request) { if ($request->maintenance_mode) { Artisan::call('down'); } elseif (app()->isDownForMaintenance()) { Artisan::call('up'); } } }