'public.file', $subject instanceof Folder => 'public.folder', $subject instanceof Group => 'public.show', }; // The slug is passed explicitly rather than the model: these routes // bind on {folderSlug}/{groupSlug} rather than the model's route key, // so handing over the model would put its id in the URL. return route($route, [$this->settings->get(Setting::PublicListingSlug), $subject->slug]); } }