- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
try
{
return ($image = $this->row->image()->first())
? $image->{$this->imageAlias}
: dummyThumbnail($this->imageAlias)
;
}
catch(\Exception $e)
{
if ($e->getMessage() === 'Method [image] is not defined on the Query class.')
{
$val = parent::value();
return (is_string($val) and \Str::contains($val, 'http://'))
? $val
: $this->row->getImageSrc($this->name, $this->imageAlias)
;
}
throw new \Exception($e->getMessage(), $e->getCode());
}