Added imageSrc presenter

This commit is contained in:
snipe 2017-11-02 04:15:09 -07:00
parent a9e5ad0df1
commit 41452450b3

View file

@ -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