storage default.svg
parent
51f14d80da
commit
39429174ae
|
|
@ -32,7 +32,7 @@ class Storage implements CastsAttributes
|
||||||
*/
|
*/
|
||||||
public function get($model, $key, $value, $attributes)
|
public function get($model, $key, $value, $attributes)
|
||||||
{
|
{
|
||||||
return $value ? (Str::startsWith($value, ['http://', 'https://']) ? $value : StorageFacades::disk($this->disk)->url($value)) : 'http://local.agriculture.host/default.svg';
|
return $value ? (Str::startsWith($value, ['http://', 'https://']) ? $value : StorageFacades::disk($this->disk)->url($value)) : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class RegionResource extends JsonResource
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
'cover' => $this->cover,
|
'cover' => $this->cover ?: url('default.svg'),
|
||||||
'director' => $this->director,
|
'director' => $this->director,
|
||||||
'area' => $this->area,
|
'area' => $this->area,
|
||||||
'description' => $this->description,
|
'description' => $this->description,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue