mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Added nameUrl presenters (for now)
This commit is contained in:
parent
aa354e883e
commit
e32d2f98b5
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue