public function postSettingsStartup(Request $request, $uuid) { $server = Models\Server::getByUUID($uuid); $this->authorize('edit-startup', $server); try { $repo = new ServerRepository(); $repo->updateStartup($server->id, $request->except(['_token'])); Alert::success('Server startup variables were successfully updated.')->flash(); } catch (DisplayException $ex) { Alert::danger($ex->getMessage())->flash(); } catch (\Exception $ex) { Log::error($ex); Alert::danger('An unhandled exception occured while attemping to update startup variables for this server. Please try again.')->flash(); } return redirect()->route('server.settings', ['uuid' => $uuid, 'tab' => 'tab_startup']); }
public function postUpdateServerStartup(Request $request, $id) { try { $server = new ServerRepository(); $server->updateStartup($id, $request->except(['_token']), true); Alert::success('Server startup variables were successfully updated.')->flash(); } catch (\Pterodactyl\Exceptions\DisplayException $e) { Alert::danger($e->getMessage())->flash(); } catch (\Exception $e) { Log::error($e); Alert::danger('An unhandled exception occured while attemping to update startup variables for this server. Please try again.')->flash(); } finally { return redirect()->route('admin.servers.view', ['id' => $id, 'tab' => 'tab_startup'])->withInput(); } }