test
This commit is contained in:
@@ -63,12 +63,8 @@ class Brand extends Model
|
|||||||
{
|
{
|
||||||
if (!empty($this->image)) {
|
if (!empty($this->image)) {
|
||||||
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
||||||
return Storage::temporaryUrl(
|
return rtrim(config('filesystems.disks.s3.url'), '/') . '/' . ltrim($this->image, '/');
|
||||||
$this->image,
|
|
||||||
Date::now()->addMinutes(5)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
;
|
|
||||||
|
|
||||||
return (string) '/' . $this->image;
|
return (string) '/' . $this->image;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,10 +148,7 @@ class Category extends Model
|
|||||||
{
|
{
|
||||||
if (!in_array($this->image, ['null', null])) {
|
if (!in_array($this->image, ['null', null])) {
|
||||||
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
||||||
return Storage::temporaryUrl(
|
return rtrim(config('filesystems.disks.s3.url'), '/') . '/' . ltrim($this->image, '/');
|
||||||
$this->image,
|
|
||||||
Date::now()->addMinutes(5)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return config('app.url') . '/' . $this->image;
|
return config('app.url') . '/' . $this->image;
|
||||||
|
|||||||
@@ -237,10 +237,7 @@ class Product extends Model
|
|||||||
{
|
{
|
||||||
if (!empty($this->poster)) {
|
if (!empty($this->poster)) {
|
||||||
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
||||||
return Storage::temporaryUrl(
|
return rtrim(config('filesystems.disks.s3.url'), '/') . '/' . ltrim($this->poster, '/');
|
||||||
$this->poster,
|
|
||||||
Date::now()->addMinutes(5)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return config('app.url') . '/' . $this->poster;
|
return config('app.url') . '/' . $this->poster;
|
||||||
}
|
}
|
||||||
@@ -252,10 +249,7 @@ class Product extends Model
|
|||||||
{
|
{
|
||||||
if (!empty($this->data_sheet) and ($this->data_sheet != null and $this->data_sheet != "null")) {
|
if (!empty($this->data_sheet) and ($this->data_sheet != null and $this->data_sheet != "null")) {
|
||||||
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
||||||
return Storage::temporaryUrl(
|
return rtrim(config('filesystems.disks.s3.url'), '/') . '/' . ltrim($this->data_sheet, '/');
|
||||||
$this->data_sheet,
|
|
||||||
Date::now()->addMinutes(5)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return config('app.url') . '/' . $this->data_sheet;
|
return config('app.url') . '/' . $this->data_sheet;
|
||||||
}
|
}
|
||||||
@@ -266,10 +260,7 @@ class Product extends Model
|
|||||||
{
|
{
|
||||||
if (!empty($this->poster_thumb)) {
|
if (!empty($this->poster_thumb)) {
|
||||||
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
||||||
return Storage::temporaryUrl(
|
return rtrim(config('filesystems.disks.s3.url'), '/') . '/' . ltrim($this->poster_thumb, '/');
|
||||||
$this->poster_thumb,
|
|
||||||
Date::now()->addMinutes(5)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return config('app.url') . '/' . $this->poster_thumb;
|
return config('app.url') . '/' . $this->poster_thumb;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class Screen extends Model
|
|||||||
{
|
{
|
||||||
if (!empty($this->path)) {
|
if (!empty($this->path)) {
|
||||||
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
||||||
return Storage::url($this->path);
|
return rtrim(config('filesystems.disks.s3.url'), '/') . '/' . ltrim($this->path, '/');
|
||||||
}
|
}
|
||||||
return config('app.url') . '/' . $this->path;
|
return config('app.url') . '/' . $this->path;
|
||||||
}
|
}
|
||||||
@@ -69,7 +69,7 @@ class Screen extends Model
|
|||||||
{
|
{
|
||||||
if (!empty($this->path_thumb)) {
|
if (!empty($this->path_thumb)) {
|
||||||
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
|
||||||
return Storage::url($this->path_thumb);
|
return rtrim(config('filesystems.disks.s3.url'), '/') . '/' . ltrim($this->path_thumb, '/');
|
||||||
}
|
}
|
||||||
return config('app.url') . '/' . $this->path_thumb;
|
return config('app.url') . '/' . $this->path_thumb;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user