@@ -95,8 +95,8 @@ |
||
| 95 | 95 | foreach ($newProductAttributes as $key => $productAttribute) { |
| 96 | 96 | $newArray = array(); |
| 97 | 97 | foreach ($productAttribute as $keyNew => $valueNew) { |
| 98 | - $newArray[] = $keyNew.': '.$valueNew['value']; |
|
| 99 | - $attributesList[$valueNew['id']] = $valueNew['value']; |
|
| 98 | + $newArray[] = $keyNew.': '.$valueNew['value']; |
|
| 99 | + $attributesList[$valueNew['id']] = $valueNew['value']; |
|
| 100 | 100 | } |
| 101 | 101 | $productAttributesList[$key] = implode(', ', $newArray); |
| 102 | 102 | } |
@@ -22,11 +22,11 @@ discard block |
||
| 22 | 22 | $query = ProductService::getImageModel()->where('product_id', '=', $productId); |
| 23 | 23 | |
| 24 | 24 | $datatables = \DataTables::of($query) |
| 25 | - ->addColumn('thumb', function ($query) use ($productId) { |
|
| 25 | + ->addColumn('thumb', function($query) use ($productId) { |
|
| 26 | 26 | return '<img src="/files/product/100x100/'.$query->product_id.'/'.$query->file.'" />'; |
| 27 | 27 | }) |
| 28 | 28 | |
| 29 | - ->addColumn('action', function ($query) use ($productId) { |
|
| 29 | + ->addColumn('action', function($query) use ($productId) { |
|
| 30 | 30 | $deleteLink = \Form::deleteajax(url()->route('product.images.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
| 31 | 31 | $links = '<a href="'.url()->route('product.images.edit', array('productId' => $productId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 32 | 32 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | public function store(Request $request, $productId) |
| 50 | 50 | { |
| 51 | - $result = ProductService::createImage($request->all(), $productId); |
|
| 51 | + $result = ProductService::createImage($request->all(), $productId); |
|
| 52 | 52 | return ProductService::notificationRedirect(array('product.images.index', $productId), $result, 'The product image was inserted.'); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -62,13 +62,13 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | if ($productImage->relatedProductAttributes->count()) { |
| 64 | 64 | foreach ($productImage->relatedProductAttributes as $row) { |
| 65 | - $selectedProductAttributes[] = $row->pivot->product_attribute_id; |
|
| 65 | + $selectedProductAttributes[] = $row->pivot->product_attribute_id; |
|
| 66 | 66 | } |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | if ($productImage->relatedAttributes->count()) { |
| 70 | 70 | foreach ($productImage->relatedAttributes as $row) { |
| 71 | - $selectedAttributes[] = $row->pivot->attribute_id; |
|
| 71 | + $selectedAttributes[] = $row->pivot->attribute_id; |
|
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | public function generateAttributeLists($product) |
| 79 | 79 | { |
| 80 | - $productAttributes = $product->attributes; |
|
| 80 | + $productAttributes = $product->attributes; |
|
| 81 | 81 | $newProductAttributes = array(); |
| 82 | 82 | $attributesList = array(); |
| 83 | 83 | $productAttributesList = array(); |
@@ -107,13 +107,13 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | public function update(Request $request, $productId, $productImageId) |
| 109 | 109 | { |
| 110 | - $result = ProductService::updateImageById($request->all(), $productId, $productImageId); |
|
| 110 | + $result = ProductService::updateImageById($request->all(), $productId, $productImageId); |
|
| 111 | 111 | return ProductService::notificationRedirect(array('product.images.index', $productId), $result, 'The product image was update.'); |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | public function destroy($productId, $productImageId) |
| 115 | 115 | { |
| 116 | - $result = ProductService::destroyImage($productImageId); |
|
| 116 | + $result = ProductService::destroyImage($productImageId); |
|
| 117 | 117 | |
| 118 | 118 | if ($result) { |
| 119 | 119 | flash('The product image is deleted.'); |
@@ -16,8 +16,8 @@ |
||
| 16 | 16 | |
| 17 | 17 | $query = ExceptionService::getModel(); |
| 18 | 18 | |
| 19 | - $datatables = \DataTables::of($query)->addColumn('action', function ($query) { |
|
| 20 | - $deleteLink = \Form::deleteajax('/admin/general-setting/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 19 | + $datatables = \DataTables::of($query)->addColumn('action', function($query) { |
|
| 20 | + $deleteLink = \Form::deleteajax('/admin/general-setting/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 21 | 21 | $links = '<a href="/admin/general-setting/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 22 | 22 | |
| 23 | 23 | return $links; |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | 'confirmation_code' => $requestChange->confirmation_code |
| 84 | 84 | ); |
| 85 | 85 | |
| 86 | - Mail::send('frontend.email.reset-account-settings-mail', $data, function ($message) use ($data) { |
|
| 86 | + Mail::send('frontend.email.reset-account-settings-mail', $data, function($message) use ($data) { |
|
| 87 | 87 | |
| 88 | 88 | $message->to($data['email'])->from('[email protected]', 'Hideyo')->subject('confirm changing account details'); |
| 89 | 89 | }); |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | return redirect()->back()->withInput(); |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | - if(ClientService::login($request)) { |
|
| 117 | + if (ClientService::login($request)) { |
|
| 118 | 118 | return redirect()->to('/account'); |
| 119 | 119 | } |
| 120 | 120 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | { |
| 132 | 132 | $validateRegister = ClientService::validateRegister($request->all()); |
| 133 | 133 | |
| 134 | - if($validateRegister->fails()) { |
|
| 134 | + if ($validateRegister->fails()) { |
|
| 135 | 135 | foreach ($validator->errors()->all() as $error) { |
| 136 | 136 | Notification::error($error); |
| 137 | 137 | } |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | if ($register) { |
| 145 | 145 | $data = $register->toArray(); |
| 146 | - Mail::send('frontend.email.register-mail', array('user' => $register->toArray(), 'password' => $request->get('password'), 'billAddress' => $register->clientBillAddress->toArray()), function ($message) use ($data) { |
|
| 146 | + Mail::send('frontend.email.register-mail', array('user' => $register->toArray(), 'password' => $request->get('password'), 'billAddress' => $register->clientBillAddress->toArray()), function($message) use ($data) { |
|
| 147 | 147 | $message->to($data['email'])->from('[email protected]', 'Hideyo')->subject(trans('register-completed-subject')); |
| 148 | 148 | }); |
| 149 | 149 | Notification::success(trans('you-are-registered-consumer')); |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | 'code' => $forgotPassword->confirmation_code |
| 188 | 188 | ); |
| 189 | 189 | |
| 190 | - Mail::send('frontend.email.reset-password-mail', $data, function ($message) use ($data) { |
|
| 190 | + Mail::send('frontend.email.reset-password-mail', $data, function($message) use ($data) { |
|
| 191 | 191 | $message->to($data['email'])->from('[email protected]', 'Hideyo')->subject('Forgot password'); |
| 192 | 192 | }); |
| 193 | 193 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | return redirect()->to('cart'); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - if($sendingMethodsList->count() AND !Cart::getConditionsByType('sending_method')->count()) { |
|
| 22 | + if ($sendingMethodsList->count() AND !Cart::getConditionsByType('sending_method')->count()) { |
|
| 23 | 23 | self::updateSendingMethod($sendingMethodsList->first()->id); |
| 24 | 24 | } |
| 25 | 25 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $request->get('amount') |
| 59 | 59 | ); |
| 60 | 60 | |
| 61 | - if($result){ |
|
| 61 | + if ($result) { |
|
| 62 | 62 | return response()->json(array( |
| 63 | 63 | 'result' => true, |
| 64 | 64 | 'producttotal' => Cart::getContent()->count(), |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $product = Cart::get($productId); |
| 90 | 90 | $amountNa = false; |
| 91 | 91 | |
| 92 | - if($product->quantity < $amount) { |
|
| 92 | + if ($product->quantity < $amount) { |
|
| 93 | 93 | $amountNa = view('frontend.cart.amount-na')->with(array('product' => $product))->render(); |
| 94 | 94 | } |
| 95 | 95 | |
@@ -25,13 +25,13 @@ |
||
| 25 | 25 | |
| 26 | 26 | $datatables = DataTables::of($query) |
| 27 | 27 | |
| 28 | - ->addColumn('action', function ($query) { |
|
| 28 | + ->addColumn('action', function($query) { |
|
| 29 | 29 | $deleteLink = Form::deleteajax(url()->route('shop.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
| 30 | 30 | $links = '<a href="'.url()->route('shop.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 31 | 31 | return $links; |
| 32 | 32 | }) |
| 33 | 33 | |
| 34 | - ->addColumn('image', function ($query) { |
|
| 34 | + ->addColumn('image', function($query) { |
|
| 35 | 35 | if ($query->logo_file_name) { |
| 36 | 36 | return '<img src="/files/shop/'.$query->id.'/'.$query->logo_file_name.'" />'; |
| 37 | 37 | } |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | $query = OrderStatusEmailTemplateService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
| 23 | 23 | |
| 24 | 24 | $datatables = DataTables::of($query) |
| 25 | - ->addColumn('action', function ($query) { |
|
| 26 | - $deleteLink = Form::deleteajax('/admin/order-status-email-template/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 25 | + ->addColumn('action', function($query) { |
|
| 26 | + $deleteLink = Form::deleteajax('/admin/order-status-email-template/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 27 | 27 | $links = '<a href="/admin/order-status-email-template/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 28 | 28 | |
| 29 | 29 | return $links; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | public function store(Request $request) |
| 44 | 44 | { |
| 45 | - $result = OrderStatusEmailTemplateService::create($request->all()); |
|
| 45 | + $result = OrderStatusEmailTemplateService::create($request->all()); |
|
| 46 | 46 | return OrderStatusEmailTemplateService::notificationRedirect('order-status-email-template.index', $result, 'The template was inserted.'); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -58,13 +58,13 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | public function update(Request $request, $templateId) |
| 60 | 60 | { |
| 61 | - $result = OrderStatusEmailTemplateService::updateById($request->all(), $templateId); |
|
| 61 | + $result = OrderStatusEmailTemplateService::updateById($request->all(), $templateId); |
|
| 62 | 62 | return OrderStatusEmailTemplateService::notificationRedirect('order-status-email-template.index', $result, 'The template was updated.'); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | public function destroy($templateId) |
| 66 | 66 | { |
| 67 | - $result = OrderStatusEmailTemplateService::destroy($templateId); |
|
| 67 | + $result = OrderStatusEmailTemplateService::destroy($templateId); |
|
| 68 | 68 | |
| 69 | 69 | if ($result) { |
| 70 | 70 | flash('template was deleted.'); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $query = OrderStatusService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
| 24 | 24 | |
| 25 | 25 | $datatables = \DataTables::of($query) |
| 26 | - ->addColumn('title', function ($query) { |
|
| 26 | + ->addColumn('title', function($query) { |
|
| 27 | 27 | |
| 28 | 28 | if ($query->color) { |
| 29 | 29 | return '<span style="background-color:'.$query->color.'; padding: 10px; line-height:30px; text-align:center; color:white;">'.$query->title.'</span>'; |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | return $query->title; |
| 33 | 33 | }) |
| 34 | - ->addColumn('action', function ($query) { |
|
| 35 | - $deleteLink = Form::deleteajax('/admin/order-status/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 34 | + ->addColumn('action', function($query) { |
|
| 35 | + $deleteLink = Form::deleteajax('/admin/order-status/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 36 | 36 | $links = '<a href="/admin/order-status/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 37 | 37 | |
| 38 | 38 | return $links; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | public function store(Request $request) |
| 53 | 53 | { |
| 54 | - $result = OrderStatusService::create($request->all()); |
|
| 54 | + $result = OrderStatusService::create($request->all()); |
|
| 55 | 55 | return OrderStatusService::notificationRedirect('order-status.index', $result, 'The order status was inserted.'); |
| 56 | 56 | } |
| 57 | 57 | |
@@ -72,13 +72,13 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | public function update(Request $request, $orderStatusId) |
| 74 | 74 | { |
| 75 | - $result = OrderStatusService::updateById($request->all(), $orderStatusId); |
|
| 75 | + $result = OrderStatusService::updateById($request->all(), $orderStatusId); |
|
| 76 | 76 | return OrderStatusService::notificationRedirect('order-status.index', $result, 'The order status was updated.'); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | public function destroy($orderStatusId) |
| 80 | 80 | { |
| 81 | - $result = OrderStatusService::destroy($orderStatusId); |
|
| 81 | + $result = OrderStatusService::destroy($orderStatusId); |
|
| 82 | 82 | |
| 83 | 83 | if ($result) { |
| 84 | 84 | flash('The order status was deleted.'); |
@@ -32,12 +32,12 @@ discard block |
||
| 32 | 32 | ->with(array('couponGroup')); |
| 33 | 33 | |
| 34 | 34 | $datatables = DataTables::of($query) |
| 35 | - ->filterColumn('title', function ($query, $keyword) { |
|
| 35 | + ->filterColumn('title', function($query, $keyword) { |
|
| 36 | 36 | $query->whereRaw("coupon.title like ?", ["%{$keyword}%"]); |
| 37 | 37 | }) |
| 38 | 38 | |
| 39 | - ->addColumn('action', function ($query) { |
|
| 40 | - $deleteLink = Form::deleteajax('/admin/coupon/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 39 | + ->addColumn('action', function($query) { |
|
| 40 | + $deleteLink = Form::deleteajax('/admin/coupon/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 41 | 41 | $links = '<a href="/admin/coupon/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 42 | 42 | |
| 43 | 43 | return $links; |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | public function store(Request $request) |
| 64 | 64 | { |
| 65 | - $result = CouponService::create($request->all()); |
|
| 65 | + $result = CouponService::create($request->all()); |
|
| 66 | 66 | return CouponService::notificationRedirect('coupon.index', $result, 'The coupon was inserted.'); |
| 67 | 67 | } |
| 68 | 68 | |
@@ -82,13 +82,13 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | public function update(Request $request, $couponId) |
| 84 | 84 | { |
| 85 | - $result = CouponService::updateById($request->all(), $couponId); |
|
| 85 | + $result = CouponService::updateById($request->all(), $couponId); |
|
| 86 | 86 | return CouponService::notificationRedirect('coupon.index', $result, 'The coupon was updated.'); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | public function destroy($couponId) |
| 90 | 90 | { |
| 91 | - $result = CouponService::destroy($couponId); |
|
| 91 | + $result = CouponService::destroy($couponId); |
|
| 92 | 92 | |
| 93 | 93 | if ($result) { |
| 94 | 94 | flash('The coupon was deleted.'); |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | $query = NewsService::getGroupModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
| 23 | 23 | |
| 24 | 24 | $datatables = \DataTables::of($query) |
| 25 | - ->addColumn('action', function ($query) { |
|
| 25 | + ->addColumn('action', function($query) { |
|
| 26 | 26 | $deleteLink = \Form::deleteajax(url()->route('news-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
| 27 | 27 | $links = '<a href="'.url()->route('news-group.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 28 | 28 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | public function store(Request $request) |
| 44 | 44 | { |
| 45 | - $result = NewsService::createGroup($request->all()); |
|
| 45 | + $result = NewsService::createGroup($request->all()); |
|
| 46 | 46 | return NewsService::notificationRedirect('news-group.index', $result, 'The news group was inserted.'); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -53,13 +53,13 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | public function update(Request $request, $newsGroupId) |
| 55 | 55 | { |
| 56 | - $result = NewsService::updateGroupById($request->all(), $newsGroupId); |
|
| 56 | + $result = NewsService::updateGroupById($request->all(), $newsGroupId); |
|
| 57 | 57 | return NewsService::notificationRedirect('news-group.index', $result, 'The news group was updated.'); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | public function destroy($newsGroupId) |
| 61 | 61 | { |
| 62 | - $result = NewsService::destroyGroup($newsGroupId); |
|
| 62 | + $result = NewsService::destroyGroup($newsGroupId); |
|
| 63 | 63 | |
| 64 | 64 | if ($result) { |
| 65 | 65 | flash('The news group was deleted.'); |