Added nameUrl presenters (for now)

This commit is contained in:
snipe 2017-04-06 20:08:47 -07:00
parent aa354e883e
commit e32d2f98b5
2 changed files with 18 additions and 0 deletions

View file

@ -99,5 +99,14 @@ class ComponentPresenter extends Presenter
return json_encode($layout);
}
/**
* Generate html link to this items name.
* @return string
*/
public function nameUrl()
{
return (string) link_to_route('consumables.show', e($this->name), $this->id);
}
}

View file

@ -119,5 +119,14 @@ class ConsumablePresenter extends Presenter
return route('consumables.show', $this->id);
}
/**
* Generate html link to this items name.
* @return string
*/
public function nameUrl()
{
return (string) link_to_route('consumables.show', e($this->name), $this->id);
}
}