diff --git a/app/Models/Brand.php b/app/Models/Brand.php index b74237d..010586f 100755 --- a/app/Models/Brand.php +++ b/app/Models/Brand.php @@ -62,7 +62,7 @@ class Brand extends Model public function getImage(): string { if (!empty($this->image)) { - if (in_array(env('FILESYSTEM_DISK'), ['s3', 'minio'])) { + if (in_array(config('filesystems.default'), ['s3', 'minio'])) { return Storage::temporaryUrl( $this->image, Date::now()->addMinutes(5) diff --git a/app/Models/Category.php b/app/Models/Category.php index 992ad11..11f321d 100755 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -147,17 +147,17 @@ class Category extends Model public function getImage(): string { if (!in_array($this->image, ['null', null])) { - if (in_array(env('FILESYSTEM_DISK'), ['s3', 'minio'])) { + if (in_array(config('filesystems.default'), ['s3', 'minio'])) { return Storage::temporaryUrl( $this->image, Date::now()->addMinutes(5) ); } - return env('APP_URL') . '/' . $this->image; + return config('app.url') . '/' . $this->image; } - return env('APP_URL') . '/images/nophoto.jpg'; + return config('app.url') . '/images/nophoto.jpg'; } public function getParentId(): int diff --git a/app/Models/Product.php b/app/Models/Product.php index 0f733db..9b77613 100755 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -236,28 +236,28 @@ class Product extends Model public function getPoster(): string { if (!empty($this->poster)) { - if (in_array(env('FILESYSTEM_DISK'), ['s3', 'minio'])) { + if (in_array(config('filesystems.default'), ['s3', 'minio'])) { return Storage::temporaryUrl( $this->poster, Date::now()->addMinutes(5) ); } - return env('APP_URL') . '/' . $this->poster; + return config('app.url') . '/' . $this->poster; } - return env('APP_URL') . '/images/no_product.jpg'; + return config('app.url') . '/images/no_product.jpg'; } public function getDataSheet() { if (!empty($this->data_sheet) and ($this->data_sheet != null and $this->data_sheet != "null")) { - if (in_array(env('FILESYSTEM_DISK'), ['s3', 'minio'])) { + if (in_array(config('filesystems.default'), ['s3', 'minio'])) { return Storage::temporaryUrl( $this->data_sheet, Date::now()->addMinutes(5) ); } - return env('APP_URL') . '/' . $this->data_sheet; + return config('app.url') . '/' . $this->data_sheet; } return null; } @@ -265,16 +265,16 @@ class Product extends Model public function getPosterThumb(): string { if (!empty($this->poster_thumb)) { - if (in_array(env('FILESYSTEM_DISK'), ['s3', 'minio'])) { + if (in_array(config('filesystems.default'), ['s3', 'minio'])) { return Storage::temporaryUrl( $this->poster_thumb, Date::now()->addMinutes(5) ); } - return env('APP_URL') . '/' . $this->poster_thumb; + return config('app.url') . '/' . $this->poster_thumb; } - return env('APP_URL') . '/images/no_product.jpg'; + return config('app.url') . '/images/no_product.jpg'; } /** diff --git a/resources/views/dashboard/products/store.blade.php b/resources/views/dashboard/products/store.blade.php index a75ffbb..d13e447 100755 --- a/resources/views/dashboard/products/store.blade.php +++ b/resources/views/dashboard/products/store.blade.php @@ -28,7 +28,7 @@ @section('content')
+ :colors="{{ json_encode($colors) }}" :back-url="{{ json_encode(url()->previous()) }}" :measurement="{{ json_encode($measurement) }}">
@endsection diff --git a/resources/views/dashboard/products/update.blade.php b/resources/views/dashboard/products/update.blade.php index 56fe4db..83cd22a 100755 --- a/resources/views/dashboard/products/update.blade.php +++ b/resources/views/dashboard/products/update.blade.php @@ -29,7 +29,7 @@
+ :back-url="{{ json_encode(url()->previous()) }}" :measurement="{{ json_encode($measurement) }}">
@endsection