storage url o'zgartirildi

This commit is contained in:
2026-04-28 15:02:06 +05:00
parent 3aa4601229
commit bb733d14c1
37 changed files with 282 additions and 407 deletions

View File

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