repository->getWithCopyAttributes($egg); $copy = $this->repository->findWhere([ ['copy_script_from', '=', null], ['nest_id', '=', $egg->nest_id], ['id', '!=', $egg], ]); $rely = $this->repository->findWhere([ ['copy_script_from', '=', $egg->id], ]); return view('admin.eggs.scripts', [ 'copyFromOptions' => $copy, 'relyOnScript' => $rely, 'egg' => $egg, ]); } /** * Handle a request to update the installation script for an Egg. * * @throws \Pterodactyl\Exceptions\Model\DataValidationException * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException * @throws \Pterodactyl\Exceptions\Service\Egg\InvalidCopyFromException */ public function update(EggScriptFormRequest $request, Egg $egg): RedirectResponse { $this->installScriptService->handle($egg, $request->normalize()); $this->alert->success(trans('admin/nests.eggs.notices.script_updated'))->flash(); return redirect()->route('admin.nests.egg.scripts', $egg); } }