@@ -13,8 +13,8 @@ discard block |
||
| 13 | 13 | public function __construct(ShopRepository $shop) |
| 14 | 14 | { |
| 15 | 15 | $this->repo = $shop; |
| 16 | - $this->storageImagePath = storage_path() .config('hideyo.storage_path'). "/shop/"; |
|
| 17 | - $this->publicImagePath = public_path() .config('hideyo.public_path'). "/shop/"; |
|
| 16 | + $this->storageImagePath = storage_path().config('hideyo.storage_path')."/shop/"; |
|
| 17 | + $this->publicImagePath = public_path().config('hideyo.public_path')."/shop/"; |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /** |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | ); |
| 32 | 32 | |
| 33 | 33 | if ($shopId) { |
| 34 | - $rules['title'] = $rules['title'].',title,'.$shopId; |
|
| 34 | + $rules['title'] = $rules['title'].',title,'.$shopId; |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | return $rules; |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | if (isset($attributes['logo'])) { |
| 50 | 50 | $destinationPath = $this->storageImagePath.$model->id; |
| 51 | - $filename = str_replace(" ", "_", strtolower($attributes['logo']->getClientOriginalName())); |
|
| 51 | + $filename = str_replace(" ", "_", strtolower($attributes['logo']->getClientOriginalName())); |
|
| 52 | 52 | $upload_success = $attributes['logo']->move($destinationPath, $filename); |
| 53 | 53 | |
| 54 | 54 | $attributes['logo_file_name'] = $filename; |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | File::delete($model->logo_file_path); |
| 91 | 91 | $destinationPath = $this->storageImagePath.$model->id; |
| 92 | 92 | |
| 93 | - $filename = str_replace(" ", "_", strtolower($attributes['logo']->getClientOriginalName())); |
|
| 93 | + $filename = str_replace(" ", "_", strtolower($attributes['logo']->getClientOriginalName())); |
|
| 94 | 94 | $upload_success = $attributes['logo']->move($destinationPath, $filename); |
| 95 | 95 | |
| 96 | 96 | $attributes['logo_file_name'] = $filename; |
@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Hideyo\Ecommerce\Framework\Services; |
| 3 | 3 | |
| 4 | - class BaseRepository |
|
| 4 | + class BaseRepository |
|
| 5 | 5 | { |
| 6 | 6 | /** |
| 7 | 7 | * Select all model items |
| 8 | 8 | * @return object|null |
| 9 | 9 | */ |
| 10 | - public function selectAll() |
|
| 11 | - { |
|
| 12 | - return $this->model->where('shop_id', auth('hideyobackend')->user()->selected_shop_id)->get(); |
|
| 13 | - } |
|
| 10 | + public function selectAll() |
|
| 11 | + { |
|
| 12 | + return $this->model->where('shop_id', auth('hideyobackend')->user()->selected_shop_id)->get(); |
|
| 13 | + } |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * select all models by shop id |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | public function selectAllByShopId($shopId) |
| 21 | 21 | { |
| 22 | - return $this->model->where('shop_id', $shopId)->get(); |
|
| 22 | + return $this->model->where('shop_id', $shopId)->get(); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function selectAllActiveByShopId($shopId) |
| 31 | 31 | { |
| 32 | - return $this->model->where('shop_id', $shopId)->where('active', 1)->get(); |
|
| 32 | + return $this->model->where('shop_id', $shopId)->where('active', 1)->get(); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | |
| 58 | 58 | //dd($list, $selected); |
| 59 | 59 | foreach ($list as $value => $display) { |
| 60 | - $sel = isset($selected[$value])?' selected="selected"':''; |
|
| 60 | + $sel = isset($selected[$value]) ? ' selected="selected"' : ''; |
|
| 61 | 61 | $html[] = '<option value="'.$value.'"'.$sel.'>'.e($display).'</option>'; |
| 62 | 62 | } |
| 63 | 63 | |