all(); $tabs = TabManager::get('settings'); return view('setting::admin.settings.edit', compact('settings', 'tabs')); } /** * Update the specified resource in storage. * * @param Request $request * * @return 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_updated')); } private function handleMaintenanceMode($request) { if ($request->maintenance_mode) { Artisan::call('down'); } else if (app()->isDownForMaintenance()) { Artisan::call('up'); } } }