@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | { |
19 | 19 | public function index(Request $request, $productId) |
20 | 20 | { |
21 | - $product = ProductService::find($productId); |
|
21 | + $product = ProductService::find($productId); |
|
22 | 22 | if ($request->wantsJson()) { |
23 | 23 | |
24 | 24 | $query = ProductService::getImageModel()->where('product_id', '=', $productId); |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | foreach ($newProductAttributes as $key => $productAttribute) { |
97 | 97 | $newArray = array(); |
98 | 98 | foreach ($productAttribute as $keyNew => $valueNew) { |
99 | - $newArray[] = $keyNew.': '.$valueNew['value']; |
|
100 | - $attributesList[$valueNew['id']] = $valueNew['value']; |
|
99 | + $newArray[] = $keyNew.': '.$valueNew['value']; |
|
100 | + $attributesList[$valueNew['id']] = $valueNew['value']; |
|
101 | 101 | } |
102 | 102 | $productAttributesList[$key] = implode(', ', $newArray); |
103 | 103 | } |
@@ -24,11 +24,11 @@ discard block |
||
24 | 24 | $query = ProductService::getImageModel()->where('product_id', '=', $productId); |
25 | 25 | |
26 | 26 | $datatables = \Datatables::of($query) |
27 | - ->addColumn('thumb', function ($query) use ($productId) { |
|
27 | + ->addColumn('thumb', function($query) use ($productId) { |
|
28 | 28 | return '<img src="/files/product/100x100/'.$query->product_id.'/'.$query->file.'" />'; |
29 | 29 | }) |
30 | 30 | |
31 | - ->addColumn('action', function ($query) use ($productId) { |
|
31 | + ->addColumn('action', function($query) use ($productId) { |
|
32 | 32 | $deleteLink = \Form::deleteajax(url()->route('product.images.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
33 | 33 | $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; |
34 | 34 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | public function store(Request $request, $productId) |
52 | 52 | { |
53 | - $result = ProductService::createImage($request->all(), $productId); |
|
53 | + $result = ProductService::createImage($request->all(), $productId); |
|
54 | 54 | return ProductService::notificationRedirect(array('product.images.index', $productId), $result, 'The product image was inserted.'); |
55 | 55 | } |
56 | 56 | |
@@ -64,13 +64,13 @@ discard block |
||
64 | 64 | |
65 | 65 | if ($productImage->relatedProductAttributes->count()) { |
66 | 66 | foreach ($productImage->relatedProductAttributes as $row) { |
67 | - $selectedProductAttributes[] = $row->pivot->product_attribute_id; |
|
67 | + $selectedProductAttributes[] = $row->pivot->product_attribute_id; |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
71 | 71 | if ($productImage->relatedAttributes->count()) { |
72 | 72 | foreach ($productImage->relatedAttributes as $row) { |
73 | - $selectedAttributes[] = $row->pivot->attribute_id; |
|
73 | + $selectedAttributes[] = $row->pivot->attribute_id; |
|
74 | 74 | } |
75 | 75 | } |
76 | 76 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | public function generateAttributeLists($product) |
81 | 81 | { |
82 | - $productAttributes = $product->attributes; |
|
82 | + $productAttributes = $product->attributes; |
|
83 | 83 | $newProductAttributes = array(); |
84 | 84 | $attributesList = array(); |
85 | 85 | $productAttributesList = array(); |
@@ -109,13 +109,13 @@ discard block |
||
109 | 109 | |
110 | 110 | public function update(Request $request, $productId, $productImageId) |
111 | 111 | { |
112 | - $result = ProductService::updateImageById($request->all(), $productId, $productImageId); |
|
112 | + $result = ProductService::updateImageById($request->all(), $productId, $productImageId); |
|
113 | 113 | return ProductService::notificationRedirect(array('product.images.index', $productId), $result, 'The product image was update.'); |
114 | 114 | } |
115 | 115 | |
116 | 116 | public function destroy($productId, $productImageId) |
117 | 117 | { |
118 | - $result = ProductService::destroyImage($productImageId); |
|
118 | + $result = ProductService::destroyImage($productImageId); |
|
119 | 119 | |
120 | 120 | if ($result) { |
121 | 121 | Notification::success('The product image is deleted.'); |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | $query = ProductRelatedProductService::getModel()->where('product_id', '=', $productId); |
28 | 28 | |
29 | 29 | $datatables = \Datatables::of($query) |
30 | - ->addColumn('related', function ($query) use ($productId) { |
|
30 | + ->addColumn('related', function($query) use ($productId) { |
|
31 | 31 | return $query->RelatedProduct->title; |
32 | 32 | }) |
33 | - ->addColumn('product', function ($query) use ($productId) { |
|
33 | + ->addColumn('product', function($query) use ($productId) { |
|
34 | 34 | return $query->Product->title; |
35 | 35 | }) |
36 | - ->addColumn('action', function ($query) use ($productId) { |
|
36 | + ->addColumn('action', function($query) use ($productId) { |
|
37 | 37 | $deleteLink = \Form::deleteajax(url()->route('product.related-product.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
38 | 38 | |
39 | 39 | return $deleteLink; |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | |
56 | 56 | public function store(Request $request, $productId) |
57 | 57 | { |
58 | - $result = ProductRelatedProductService::create($request->all(), $productId); |
|
58 | + $result = ProductRelatedProductService::create($request->all(), $productId); |
|
59 | 59 | return redirect()->route('product.related-product.index', $productId); |
60 | 60 | } |
61 | 61 | |
62 | 62 | public function destroy($productId, $productRelatedProductId) |
63 | 63 | { |
64 | - $result = ProductRelatedProductService::destroy($productRelatedProductId); |
|
64 | + $result = ProductRelatedProductService::destroy($productRelatedProductId); |
|
65 | 65 | |
66 | 66 | if ($result) { |
67 | 67 | Notification::success('The related product is deleted.'); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | ->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
29 | 29 | |
30 | - $datatables = Datatables::of($query)->addColumn('action', function ($query) { |
|
30 | + $datatables = Datatables::of($query)->addColumn('action', function($query) { |
|
31 | 31 | $deleteLink = Form::deleteajax(url()->route('sending-method.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'), $query->title); |
32 | 32 | $links = '<a href="'.url()->route('sending-method.country-prices.index', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Country prices ('.$query->countryPrices()->count().')</a> <a href="/admin/sending-method/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
33 | 33 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | public function store(Request $request) |
53 | 53 | { |
54 | - $result = SendingMethodService::create($request->all()); |
|
54 | + $result = SendingMethodService::create($request->all()); |
|
55 | 55 | return SendingMethodService::notificationRedirect('sending-method.index', $result, 'The sending method was inserted.'); |
56 | 56 | } |
57 | 57 | |
@@ -68,13 +68,13 @@ discard block |
||
68 | 68 | |
69 | 69 | public function update(Request $request, $sendingMethodId) |
70 | 70 | { |
71 | - $result = SendingMethodService::updateById($request->all(), $sendingMethodId); |
|
71 | + $result = SendingMethodService::updateById($request->all(), $sendingMethodId); |
|
72 | 72 | return SendingMethodService::notificationRedirect('sending-method.index', $result, 'The sending method was updated.'); |
73 | 73 | } |
74 | 74 | |
75 | 75 | public function destroy($sendingMethodId) |
76 | 76 | { |
77 | - $result = SendingMethodService::destroy($sendingMethodId); |
|
77 | + $result = SendingMethodService::destroy($sendingMethodId); |
|
78 | 78 | |
79 | 79 | if ($result) { |
80 | 80 | Notification::success('The sending method was deleted.'); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | { |
27 | 27 | $product = ProductService::find($productId); |
28 | 28 | |
29 | - if($product) { |
|
29 | + if ($product) { |
|
30 | 30 | if ($request->wantsJson()) { |
31 | 31 | |
32 | 32 | $query = ProductCombinationService::getModel()->select( |
@@ -34,18 +34,18 @@ discard block |
||
34 | 34 | 'default_on'] |
35 | 35 | )->where('product_id', '=', $productId); |
36 | 36 | |
37 | - $datatables = \Datatables::of($query)->addColumn('action', function ($query) use ($productId) { |
|
37 | + $datatables = \Datatables::of($query)->addColumn('action', function($query) use ($productId) { |
|
38 | 38 | $deleteLink = \Form::deleteajax(url()->route('product-combination.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
39 | 39 | $links = '<a href="'.url()->route('product-combination.edit', array('productId' => $productId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
40 | 40 | |
41 | 41 | return $links; |
42 | 42 | }) |
43 | 43 | |
44 | - ->addColumn('amount', function ($query) { |
|
44 | + ->addColumn('amount', function($query) { |
|
45 | 45 | return '<input type="text" class="change-amount-product-attribute" value="'.$query->amount.'" data-url="/admin/product/'.$query->product_id.'/product-combination/change-amount-attribute/'.$query->id.'">'; |
46 | 46 | }) |
47 | 47 | |
48 | - ->addColumn('price', function ($query) { |
|
48 | + ->addColumn('price', function($query) { |
|
49 | 49 | $result = 0; |
50 | 50 | if ($query->price) { |
51 | 51 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | 'amount' => $query->amount |
95 | 95 | ); |
96 | 96 | |
97 | - $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
97 | + $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
98 | 98 | |
99 | 99 | |
100 | 100 | if ($query->discount_value) { |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | return $result; |
106 | 106 | }) |
107 | 107 | |
108 | - ->addColumn('combinations', function ($query) use ($productId) { |
|
108 | + ->addColumn('combinations', function($query) use ($productId) { |
|
109 | 109 | $items = array(); |
110 | 110 | foreach ($query->combinations as $row) { |
111 | 111 | $items[] = $row->attribute->attributeGroup->title.': '.$row->attribute->value; |
@@ -150,8 +150,8 @@ discard block |
||
150 | 150 | |
151 | 151 | public function store(Request $request, $productId) |
152 | 152 | { |
153 | - $result = ProductCombinationService::create($request->all(), $productId); |
|
154 | - if($result) { |
|
153 | + $result = ProductCombinationService::create($request->all(), $productId); |
|
154 | + if ($result) { |
|
155 | 155 | return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product extra fields are updated.'); |
156 | 156 | |
157 | 157 | } |
@@ -188,14 +188,14 @@ discard block |
||
188 | 188 | public function update(Request $request, $productId, $id) |
189 | 189 | { |
190 | 190 | |
191 | - $result = ProductCombinationService::updateById($request->all(), $productId, $id); |
|
191 | + $result = ProductCombinationService::updateById($request->all(), $productId, $id); |
|
192 | 192 | return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product combinations are updated.'); |
193 | 193 | |
194 | 194 | } |
195 | 195 | |
196 | 196 | public function destroy($productId, $id) |
197 | 197 | { |
198 | - $result = ProductCombinationService::destroy($id); |
|
198 | + $result = ProductCombinationService::destroy($id); |
|
199 | 199 | |
200 | 200 | if ($result) { |
201 | 201 | Notification::success('The product combination is deleted.'); |
@@ -25,13 +25,13 @@ discard block |
||
25 | 25 | ->select(['id', 'title', 'logo_file_name']); |
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="http://shop.brulo.nl/files/'.$query->id.'/logo/'.$query->logo_file_name.'" />'; |
37 | 37 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | public function store(Request $request) |
52 | 52 | { |
53 | - $result = ShopService::create($request->all()); |
|
53 | + $result = ShopService::create($request->all()); |
|
54 | 54 | return ShopService::notificationRedirect('shop.index', $result, 'The shop was inserted.'); |
55 | 55 | } |
56 | 56 | |
@@ -61,13 +61,13 @@ discard block |
||
61 | 61 | |
62 | 62 | public function update(Request $request, $shopId) |
63 | 63 | { |
64 | - $result = ShopService::updateById($request->all(), $shopId); |
|
64 | + $result = ShopService::updateById($request->all(), $shopId); |
|
65 | 65 | return ShopService::notificationRedirect('shop.index', $result, 'The shop was updated.'); |
66 | 66 | } |
67 | 67 | |
68 | 68 | public function destroy($shopId) |
69 | 69 | { |
70 | - $result = ShopService::destroy($shopId); |
|
70 | + $result = ShopService::destroy($shopId); |
|
71 | 71 | |
72 | 72 | if ($result) { |
73 | 73 | Notification::success('The shop was deleted.'); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | { |
15 | 15 | if ($request->wantsJson()) { |
16 | 16 | $query = TaxRateService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
17 | - $datatables = Datatables::of($query)->addColumn('action', function ($query) { |
|
17 | + $datatables = Datatables::of($query)->addColumn('action', function($query) { |
|
18 | 18 | $deleteLink = Form::deleteajax(url()->route('tax-rate.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'), $query->title); |
19 | 19 | $links = '<a href="'.url()->route('tax-rate.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
20 | 20 | return $links; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | public function store(Request $request) |
35 | 35 | { |
36 | - $result = TaxRateService::create($request->all()); |
|
36 | + $result = TaxRateService::create($request->all()); |
|
37 | 37 | return TaxRateService::notificationRedirect('tax-rate.index', $result, 'The tax rate was inserted.'); |
38 | 38 | } |
39 | 39 | |
@@ -44,13 +44,13 @@ discard block |
||
44 | 44 | |
45 | 45 | public function update(Request $request, $taxRateId) |
46 | 46 | { |
47 | - $result = TaxRateService::updateById($request->all(), $taxRateId); |
|
47 | + $result = TaxRateService::updateById($request->all(), $taxRateId); |
|
48 | 48 | return TaxRateService::notificationRedirect('tax-rate.index', $result, 'The tax rate was updated.'); |
49 | 49 | } |
50 | 50 | |
51 | 51 | public function destroy($taxRateId) |
52 | 52 | { |
53 | - $result = TaxRateService::destroy($taxRateId); |
|
53 | + $result = TaxRateService::destroy($taxRateId); |
|
54 | 54 | if ($result) { |
55 | 55 | Notification::error('The tax rate was deleted.'); |
56 | 56 | return redirect()->route('tax-rate.index'); |
@@ -48,7 +48,7 @@ |
||
48 | 48 | }) |
49 | 49 | ->addColumn('bill', function ($addresses) { |
50 | 50 | if ($addresses->clientBillAddress()->count()) { |
51 | - return '<span class="glyphicon glyphicon-ok icon-green"></span>'; |
|
51 | + return '<span class="glyphicon glyphicon-ok icon-green"></span>'; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | return '<span class="glyphicon glyphicon-remove icon-red"></span>'; |
@@ -36,24 +36,24 @@ discard block |
||
36 | 36 | )->with(array('clientDeliveryAddress', 'clientBillAddress'))->where('client_id', '=', $clientId); |
37 | 37 | |
38 | 38 | $datatables = Datatables::of($addresses) |
39 | - ->addColumn('housenumber', function ($addresses) { |
|
39 | + ->addColumn('housenumber', function($addresses) { |
|
40 | 40 | return $addresses->housenumber.$addresses->housenumber_suffix; |
41 | 41 | }) |
42 | - ->addColumn('delivery', function ($addresses) { |
|
42 | + ->addColumn('delivery', function($addresses) { |
|
43 | 43 | if ($addresses->clientDeliveryAddress()->count()) { |
44 | 44 | return '<span class="glyphicon glyphicon-ok icon-green"></span>'; |
45 | 45 | } |
46 | 46 | |
47 | 47 | return '<span class="glyphicon glyphicon-remove icon-red"></span>'; |
48 | 48 | }) |
49 | - ->addColumn('bill', function ($addresses) { |
|
49 | + ->addColumn('bill', function($addresses) { |
|
50 | 50 | if ($addresses->clientBillAddress()->count()) { |
51 | 51 | return '<span class="glyphicon glyphicon-ok icon-green"></span>'; |
52 | 52 | } |
53 | 53 | |
54 | 54 | return '<span class="glyphicon glyphicon-remove icon-red"></span>'; |
55 | 55 | }) |
56 | - ->addColumn('action', function ($addresses) use ($clientId) { |
|
56 | + ->addColumn('action', function($addresses) use ($clientId) { |
|
57 | 57 | $deleteLink = Form::deleteajax(url()->route('client.addresses.destroy', array('clientId' => $clientId, 'clientAddressId' => $addresses->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
58 | 58 | $links = '<a href="'.url()->route('client.addresses.edit', array('clientId' => $clientId, 'clientAddressId' => $addresses->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
59 | 59 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | public function store(Request $request, $clientId) |
76 | 76 | { |
77 | - $result = ClientService::createAddress($request->all(), $clientId); |
|
77 | + $result = ClientService::createAddress($request->all(), $clientId); |
|
78 | 78 | return ClientService::notificationRedirect(array('client.addresses.index', $clientId), $result, 'The client adress is inserted.'); |
79 | 79 | } |
80 | 80 | |
@@ -86,13 +86,13 @@ discard block |
||
86 | 86 | |
87 | 87 | public function update(Request $request, $clientId, $id) |
88 | 88 | { |
89 | - $result = ClientService::editAddress($clientId, $id, $request->all()); |
|
89 | + $result = ClientService::editAddress($clientId, $id, $request->all()); |
|
90 | 90 | return ClientService::notificationRedirect(array('client.addresses.index', $clientId), $result, 'The client adress is updated.'); |
91 | 91 | } |
92 | 92 | |
93 | 93 | public function destroy($clientId, $id) |
94 | 94 | { |
95 | - $result = ClientService::destroyAddress($id); |
|
95 | + $result = ClientService::destroyAddress($id); |
|
96 | 96 | |
97 | 97 | if ($result) { |
98 | 98 | Notification::success('The client address is deleted.'); |
@@ -23,15 +23,15 @@ discard block |
||
23 | 23 | if ($request->wantsJson()) { |
24 | 24 | |
25 | 25 | $image = BrandService::getModelImage() |
26 | - ->select(['id','file', 'brand_id']) |
|
26 | + ->select(['id', 'file', 'brand_id']) |
|
27 | 27 | ->where('brand_id', '=', $brandId); |
28 | 28 | |
29 | 29 | $datatables = Datatables::of($image) |
30 | 30 | |
31 | - ->addColumn('thumb', function ($image) { |
|
31 | + ->addColumn('thumb', function($image) { |
|
32 | 32 | return '<img src="'.config('hideyo.public_path').'/brand/100x100/'.$image->brand_id.'/'.$image->file.'" />'; |
33 | 33 | }) |
34 | - ->addColumn('action', function ($image) use ($brandId) { |
|
34 | + ->addColumn('action', function($image) use ($brandId) { |
|
35 | 35 | $deleteLink = Form::deleteajax(url()->route('brand.images.destroy', array('brandId' => $brandId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
36 | 36 | $links = '<a href="'.url()->route('brand.images.edit', array('brandId' => $brandId, 'id' => $image->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
37 | 37 | return $links; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | return $datatables->make(true); |
41 | 41 | } |
42 | 42 | |
43 | - return view('backend.brand_image.index')->with(array( 'brand' => $brand)); |
|
43 | + return view('backend.brand_image.index')->with(array('brand' => $brand)); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | public function create($brandId) |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | public function store(Request $request, $brandId) |
53 | 53 | { |
54 | - $result = BrandService::createImage($request->all(), $brandId); |
|
54 | + $result = BrandService::createImage($request->all(), $brandId); |
|
55 | 55 | return BrandService::notificationRedirect(array('brand.images.index', $brandId), $result, 'The brand image was inserted.'); |
56 | 56 | } |
57 | 57 | |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | |
64 | 64 | public function update(Request $request, $brandId, $brandImageId) |
65 | 65 | { |
66 | - $result = BrandService::updateImageById($request->all(), $brandId, $brandImageId); |
|
66 | + $result = BrandService::updateImageById($request->all(), $brandId, $brandImageId); |
|
67 | 67 | return BrandService::notificationRedirect(array('brand.images.index', $brandId), $result, 'The brand image was updated.'); |
68 | 68 | } |
69 | 69 | |
70 | 70 | public function destroy($brandId, $brandImageId) |
71 | 71 | { |
72 | - $result = BrandService::destroyImage($brandImageId); |
|
72 | + $result = BrandService::destroyImage($brandImageId); |
|
73 | 73 | |
74 | 74 | if ($result) { |
75 | 75 | Notification::success('The file was deleted.'); |
@@ -35,11 +35,11 @@ discard block |
||
35 | 35 | $datatables = Datatables::of($clients) |
36 | 36 | |
37 | 37 | |
38 | - ->addColumn('last_login', function ($clients) { |
|
38 | + ->addColumn('last_login', function($clients) { |
|
39 | 39 | return date('d F H:i', strtotime($clients->last_login)); |
40 | 40 | }) |
41 | 41 | |
42 | - ->addColumn('action', function ($clients) { |
|
42 | + ->addColumn('action', function($clients) { |
|
43 | 43 | $deleteLink = Form::deleteajax(url()->route('client.destroy', $clients->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
44 | 44 | $links = '<a href="'.url()->route('client.edit', $clients->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Show</a> '.$deleteLink; |
45 | 45 | |
@@ -76,10 +76,10 @@ discard block |
||
76 | 76 | public function postActivate(Request $request, $clientId) |
77 | 77 | { |
78 | 78 | $input = $request->all(); |
79 | - $result = ClientService::activate($clientId); |
|
79 | + $result = ClientService::activate($clientId); |
|
80 | 80 | |
81 | 81 | if ($input['send_mail']) { |
82 | - Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) { |
|
82 | + Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) { |
|
83 | 83 | $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.'); |
84 | 84 | }); |
85 | 85 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | public function store(Request $request) |
101 | 101 | { |
102 | - $result = ClientService::create($request->all()); |
|
102 | + $result = ClientService::create($request->all()); |
|
103 | 103 | return ClientService::notificationRedirect('client.index', $result, 'The client was inserted.'); |
104 | 104 | } |
105 | 105 | |
@@ -130,24 +130,24 @@ discard block |
||
130 | 130 | |
131 | 131 | public function postExport() |
132 | 132 | { |
133 | - $result = ClientService::selectAllExport(); |
|
134 | - Excel::create('export', function ($excel) use ($result) { |
|
133 | + $result = ClientService::selectAllExport(); |
|
134 | + Excel::create('export', function($excel) use ($result) { |
|
135 | 135 | |
136 | - $excel->sheet('Clients', function ($sheet) use ($result) { |
|
136 | + $excel->sheet('Clients', function($sheet) use ($result) { |
|
137 | 137 | $newArray = array(); |
138 | 138 | foreach ($result as $row) { |
139 | 139 | $firstname = null; |
140 | - if($row->clientBillAddress) { |
|
140 | + if ($row->clientBillAddress) { |
|
141 | 141 | $firstname = $row->clientBillAddress->firstname; |
142 | 142 | } |
143 | 143 | |
144 | 144 | $lastname = null; |
145 | - if($row->clientBillAddress) { |
|
145 | + if ($row->clientBillAddress) { |
|
146 | 146 | $lastname = $row->clientBillAddress->lastname; |
147 | 147 | } |
148 | 148 | |
149 | 149 | $gender = null; |
150 | - if($row->clientBillAddress) { |
|
150 | + if ($row->clientBillAddress) { |
|
151 | 151 | $gender = $row->clientBillAddress->gender; |
152 | 152 | } |
153 | 153 | |
@@ -171,12 +171,12 @@ discard block |
||
171 | 171 | |
172 | 172 | public function update(Request $request, $clientId) |
173 | 173 | { |
174 | - $result = ClientService::updateById($request->all(), $clientId); |
|
174 | + $result = ClientService::updateById($request->all(), $clientId); |
|
175 | 175 | $input = $request->all(); |
176 | 176 | if (isset($result->id)) { |
177 | 177 | if ($result->active) { |
178 | 178 | if ($input['send_mail']) { |
179 | - Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) { |
|
179 | + Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) { |
|
180 | 180 | $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.'); |
181 | 181 | }); |
182 | 182 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | |
198 | 198 | public function destroy($clientId) |
199 | 199 | { |
200 | - $result = ClientService::destroy($clientId); |
|
200 | + $result = ClientService::destroy($clientId); |
|
201 | 201 | |
202 | 202 | if ($result) { |
203 | 203 | Notification::success('The client was deleted.'); |