entity->getEntityType(); $id = $this->entity->public_id; $link = sprintf('/%ss/%s', $type, $id); return URL::to($link); } /** * @return mixed */ public function link() { $name = $this->entity->getDisplayName(); $link = $this->url(); return link_to($link, $name)->toHtml(); } }