storage url o'zgartirildi
This commit is contained in:
@@ -236,10 +236,7 @@ class Product extends Model
|
||||
public function getPoster(): string
|
||||
{
|
||||
if (!empty($this->poster)) {
|
||||
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
||||
return Storage::url($this->poster);
|
||||
}
|
||||
return config('app.url') . '/' . $this->poster;
|
||||
return Storage::url($this->poster);
|
||||
}
|
||||
|
||||
return config('app.url') . '/images/no_product.jpg';
|
||||
@@ -248,10 +245,7 @@ class Product extends Model
|
||||
public function getDataSheet()
|
||||
{
|
||||
if (!empty($this->data_sheet) and ($this->data_sheet != null and $this->data_sheet != "null")) {
|
||||
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
||||
return Storage::url($this->data_sheet);
|
||||
}
|
||||
return config('app.url') . '/' . $this->data_sheet;
|
||||
return Storage::url($this->data_sheet);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -259,10 +253,7 @@ class Product extends Model
|
||||
public function getPosterThumb(): string
|
||||
{
|
||||
if (!empty($this->poster_thumb)) {
|
||||
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
||||
return Storage::url($this->poster_thumb);
|
||||
}
|
||||
return config('app.url') . '/' . $this->poster_thumb;
|
||||
return Storage::url($this->poster_thumb);
|
||||
}
|
||||
|
||||
return config('app.url') . '/images/no_product.jpg';
|
||||
|
||||
Reference in New Issue
Block a user