alert = $alert; $this->repository = $repository; $this->creationService = $creationService; } /** * Return the mount overview page. * * @return \Illuminate\View\View */ public function index() { return view('admin.mounts.index', [ 'mounts' => $this->repository->getAllWithDetails(), ]); } /** * Handle request to create new mount. * * @param \Pterodactyl\Http\Requests\Admin\MountFormRequest $request * @return \Illuminate\Http\RedirectResponse * * @throws \Throwable */ public function create(MountFormRequest $request) { $mount = $this->creationService->handle($request->normalize()); $this->alert->success('Mount was created successfully.')->flash(); //return redirect()->route('admin.mounts.view', $mount->id); return redirect()->route('admin.mounts'); } }