1
0
Fork 0

storage default.svg

develop
panliang 2023-09-15 10:27:57 +08:00
parent 51f14d80da
commit 39429174ae
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ class Storage implements CastsAttributes
*/
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)) : '';
}
/**

View File

@ -17,7 +17,7 @@ class RegionResource extends JsonResource
return [
'id' => $this->id,
'name' => $this->name,
'cover' => $this->cover,
'cover' => $this->cover ?: url('default.svg'),
'director' => $this->director,
'area' => $this->area,
'description' => $this->description,