user() instanceof Account) { return view('superuser.hak-akses.legacy', ['authorities' => $this->authorities->all()]); } return view('superuser.hak-akses.index', [ 'roles' => SuperuserData::ROLES, 'groups' => SuperuserData::hakAkses(), 'kode' => SuperuserData::kodeAkses(), ]); } public function show(Request $request, int $id): View { abort_unless($request->user() instanceof Account, 404); $authority = $this->authorities->find($id); abort_if($authority === null, 404); return view('superuser.hak-akses.show', ['authority' => $authority]); } }