config = $config; } /** * Render server index page with the console and power options. * * @param \Illuminate\Http\Request $request * @return \Illuminate\View\View */ public function index(Request $request): View { $server = $request->attributes->get('server'); $this->setRequest($request)->injectJavascript([ 'meta' => [ 'saveFile' => route('server.files.save', $server->uuidShort), 'csrfToken' => csrf_token(), ], 'config' => [ 'console_count' => $this->config->get('pterodactyl.console.count'), 'console_freq' => $this->config->get('pterodactyl.console.frequency'), ], ]); return view('server.index'); } /** * Render a stand-alone console in the browser. * * @param \Illuminate\Http\Request $request * @return \Illuminate\View\View */ public function console(Request $request): View { $this->setRequest($request)->injectJavascript(['config' => [ 'console_count' => $this->config->get('pterodactyl.console.count'), 'console_freq' => $this->config->get('pterodactyl.console.frequency'), ]]); return view('server.console'); } }