mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Added imageSrc presenter
This commit is contained in:
parent
a9e5ad0df1
commit
41452450b3
|
@ -78,6 +78,18 @@ class AssetModelPresenter extends Presenter
|
|||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate img tag to this models image.
|
||||
* @return string
|
||||
*/
|
||||
public function imageSrc()
|
||||
{
|
||||
if (!empty($this->image)) {
|
||||
return url('/') . '/uploads/models/' . $this->image;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Url to view this item.
|
||||
* @return string
|
||||
|
|
Loading…
Reference in a new issue