/** * Handle the command. * * @param BreadcrumbCollection $breadcrumbs */ public function handle(BreadcrumbCollection $breadcrumbs) { $disk = $this->folder->getDisk(); $uri = 'admin/files/browser/' . $disk->getSlug(); foreach (explode('/', $this->folder->path()) as $name) { $breadcrumbs->add($name, $uri = $uri . '/' . $name); } }
/** * Return the browser link. * * @return string */ public function viewLink() { return app('html')->link(implode('/', array_filter(['admin', 'files', 'browser', $this->object->getDisk()->getSlug(), $this->object->path()])), $this->object->getName()); }