@@ -43,7 +43,7 @@ |
||
43 | 43 | $template = 'frontend.product.combinations'; |
44 | 44 | |
45 | 45 | $leadingAttributeId = key(reset($newPullDowns)); |
46 | - if($productAttributeId) { |
|
46 | + if ($productAttributeId) { |
|
47 | 47 | $leadingAttributeId = $productAttributeId; |
48 | 48 | } else { |
49 | 49 | $productAttributeId = $pullDowns['productAttribute']->first()->id; |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | public function store($productId, Request $request) |
48 | 48 | { |
49 | - $result = ProductExtraFieldValueService::create($request->all(), $productId); |
|
49 | + $result = ProductExtraFieldValueService::create($request->all(), $productId); |
|
50 | 50 | return ProductExtraFieldValueService::notificationRedirect(array('product.product-extra-field-value.index', $productId), $result, 'The product extra fields are updated.'); |
51 | 51 | } |
52 | 52 | } |
@@ -41,12 +41,12 @@ discard block |
||
41 | 41 | |
42 | 42 | |
43 | 43 | $datatables = \DataTables::of($invoice) |
44 | - ->addColumn('price_with_tax', function ($order) { |
|
44 | + ->addColumn('price_with_tax', function($order) { |
|
45 | 45 | $money = '€ '.$order->price_with_tax; |
46 | 46 | return $money; |
47 | 47 | }) |
48 | - ->addColumn('action', function ($invoice) { |
|
49 | - $deleteLink = \Form::deleteajax('/invoice/'. $invoice->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
48 | + ->addColumn('action', function($invoice) { |
|
49 | + $deleteLink = \Form::deleteajax('/invoice/'.$invoice->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
50 | 50 | $download = '<a href="/invoice/'.$invoice->id.'/download" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Download</a> '; |
51 | 51 | $links = '<a href="/invoice/'.$invoice->id.'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Show</a> '.$download; |
52 | 52 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | public function store() |
84 | 84 | { |
85 | - $result = $this->invoice->create(Request::all()); |
|
85 | + $result = $this->invoice->create(Request::all()); |
|
86 | 86 | |
87 | 87 | if (isset($result->id)) { |
88 | 88 | \Notification::success('The invoice was inserted.'); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | public function update($invoiceId) |
106 | 106 | { |
107 | - $result = $this->invoice->updateById(Request::all(), $invoiceId); |
|
107 | + $result = $this->invoice->updateById(Request::all(), $invoiceId); |
|
108 | 108 | |
109 | 109 | if (isset($result->id)) { |
110 | 110 | \Notification::success('The invoice was updated.'); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | public function destroy($invoiceId) |
119 | 119 | { |
120 | - $result = $this->invoice->destroy($invoiceId); |
|
120 | + $result = $this->invoice->destroy($invoiceId); |
|
121 | 121 | |
122 | 122 | if ($result) { |
123 | 123 | Notification::success('The invoice was deleted.'); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $query = CouponService::getGroupModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
25 | 25 | |
26 | 26 | $datatables = \DataTables::of($query) |
27 | - ->addColumn('action', function ($query) { |
|
27 | + ->addColumn('action', function($query) { |
|
28 | 28 | $deleteLink = Form::deleteajax(url()->route('coupon-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger')); |
29 | 29 | $links = '<a href="'.url()->route('coupon-group.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
30 | 30 | return $links; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | public function store(Request $request) |
45 | 45 | { |
46 | - $result = CouponService::createGroup($request->all()); |
|
46 | + $result = CouponService::createGroup($request->all()); |
|
47 | 47 | return CouponService::notificationRedirect('coupon-group.index', $result, 'The coupon group was inserted.'); |
48 | 48 | } |
49 | 49 | |
@@ -54,13 +54,13 @@ discard block |
||
54 | 54 | |
55 | 55 | public function update(Request $request, $couponGroupId) |
56 | 56 | { |
57 | - $result = CouponService::updateGroupById($request->all(), $couponGroupId); |
|
57 | + $result = CouponService::updateGroupById($request->all(), $couponGroupId); |
|
58 | 58 | return CouponService::notificationRedirect('coupon-group.index', $result, 'The coupon group was updated.'); |
59 | 59 | } |
60 | 60 | |
61 | 61 | public function destroy($couponGroupId) |
62 | 62 | { |
63 | - $result = CouponService::destroyGroup($couponGroupId); |
|
63 | + $result = CouponService::destroyGroup($couponGroupId); |
|
64 | 64 | |
65 | 65 | if ($result) { |
66 | 66 | Notification::success('The coupon was deleted.'); |
@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | |
32 | 32 | $datatables = DataTables::of($image) |
33 | 33 | |
34 | - ->addColumn('thumb', function ($image) { |
|
34 | + ->addColumn('thumb', function($image) { |
|
35 | 35 | return '<img src="/files/content/100x100/'.$image->content_id.'/'.$image->file.'" />'; |
36 | 36 | }) |
37 | - ->addColumn('action', function ($image) use ($contentId) { |
|
38 | - $deleteLink = Form::deleteajax('/admin/content/'.$contentId.'/images/'. $image->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
37 | + ->addColumn('action', function($image) use ($contentId) { |
|
38 | + $deleteLink = Form::deleteajax('/admin/content/'.$contentId.'/images/'.$image->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
39 | 39 | $links = '<a href="/admin/content/'.$contentId.'/images/'.$image->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
40 | 40 | |
41 | 41 | return $links; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | public function store(Request $request, $contentId) |
57 | 57 | { |
58 | - $result = ContentService::createImage($request->all(), $contentId); |
|
58 | + $result = ContentService::createImage($request->all(), $contentId); |
|
59 | 59 | return ContentService::notificationRedirect(array('content.{contentId}.images.index', $contentId), $result, 'The content image was inserted.'); |
60 | 60 | } |
61 | 61 | |
@@ -67,13 +67,13 @@ discard block |
||
67 | 67 | |
68 | 68 | public function update(Request $request, $contentId, $contentImageId) |
69 | 69 | { |
70 | - $result = ContentService::updateImageById($request->all(), $contentId, $contentImageId); |
|
70 | + $result = ContentService::updateImageById($request->all(), $contentId, $contentImageId); |
|
71 | 71 | return ContentService::notificationRedirect(array('content.{contentId}.images.index', $contentId), $result, 'The content image was updated.'); |
72 | 72 | } |
73 | 73 | |
74 | 74 | public function destroy($contentId, $contentImageId) |
75 | 75 | { |
76 | - $result = ContentService::destroyImage($contentImageId); |
|
76 | + $result = ContentService::destroyImage($contentImageId); |
|
77 | 77 | |
78 | 78 | if ($result) { |
79 | 79 | Notification::success('The file was deleted.'); |
@@ -31,20 +31,20 @@ discard block |
||
31 | 31 | ->with(array('newsGroup')) ->leftJoin(NewsService::getGroupModel()->getTable(), NewsService::getGroupModel()->getTable().'.id', '=', 'news_group_id'); |
32 | 32 | |
33 | 33 | $datatables = DataTables::of($query) |
34 | - ->filterColumn('title', function ($query, $keyword) { |
|
34 | + ->filterColumn('title', function($query, $keyword) { |
|
35 | 35 | |
36 | 36 | $query->where( |
37 | - function ($query) use ($keyword) { |
|
37 | + function($query) use ($keyword) { |
|
38 | 38 | $query->whereRaw("news.title like ?", ["%{$keyword}%"]); |
39 | 39 | ; |
40 | 40 | } |
41 | 41 | ); |
42 | 42 | }) |
43 | - ->addColumn('newsgroup', function ($query) { |
|
43 | + ->addColumn('newsgroup', function($query) { |
|
44 | 44 | return $query->newstitle; |
45 | 45 | }) |
46 | 46 | |
47 | - ->addColumn('action', function ($query) { |
|
47 | + ->addColumn('action', function($query) { |
|
48 | 48 | $deleteLink = Form::deleteajax(url()->route('news.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
49 | 49 | $links = '<a href="'.url()->route('news.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
50 | 50 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | public function store(Request $request) |
67 | 67 | { |
68 | - $result = NewsService::create($request->all()); |
|
68 | + $result = NewsService::create($request->all()); |
|
69 | 69 | return NewsService::notificationRedirect('news.index', $result, 'The news item was inserted.'); |
70 | 70 | } |
71 | 71 | |
@@ -90,13 +90,13 @@ discard block |
||
90 | 90 | |
91 | 91 | public function update(Request $request, $newsId) |
92 | 92 | { |
93 | - $result = NewsService::updateById($request->all(), $newsId); |
|
93 | + $result = NewsService::updateById($request->all(), $newsId); |
|
94 | 94 | return NewsService::notificationRedirect('news.index', $result, 'The news item was inserted.'); |
95 | 95 | } |
96 | 96 | |
97 | 97 | public function destroy($newsId) |
98 | 98 | { |
99 | - $result = NewsService::destroy($newsId); |
|
99 | + $result = NewsService::destroy($newsId); |
|
100 | 100 | |
101 | 101 | if ($result) { |
102 | 102 | Notification::success('The news was deleted.'); |
@@ -44,16 +44,16 @@ discard block |
||
44 | 44 | |
45 | 45 | $datatables = DataTables::of($order) |
46 | 46 | |
47 | - ->addColumn('status', function ($order) { |
|
47 | + ->addColumn('status', function($order) { |
|
48 | 48 | if ($order->orderStatus) { |
49 | 49 | return $order->orderStatus->title; |
50 | 50 | } |
51 | 51 | }) |
52 | 52 | |
53 | - ->addColumn('created_at', function ($order) { |
|
53 | + ->addColumn('created_at', function($order) { |
|
54 | 54 | return date('d F H:i', strtotime($order->created_at)); |
55 | 55 | }) |
56 | - ->addColumn('status', function ($order) { |
|
56 | + ->addColumn('status', function($order) { |
|
57 | 57 | if ($order->orderStatus) { |
58 | 58 | if ($order->orderStatus->color) { |
59 | 59 | return '<a href="/admin/order/'.$order->id.'" style="text-decoration:none;"><span style="background-color:'.$order->orderStatus->color.'; padding: 10px; line-height:30px; text-align:center; color:white;">'.$order->orderStatus->title.'</span></a>'; |
@@ -61,33 +61,33 @@ discard block |
||
61 | 61 | return $order->orderStatus->title; |
62 | 62 | } |
63 | 63 | }) |
64 | - ->addColumn('client', function ($order) { |
|
64 | + ->addColumn('client', function($order) { |
|
65 | 65 | if ($order->client) { |
66 | 66 | if ($order->orderBillAddress) { |
67 | 67 | return $order->orderBillAddress->firstname.' '.$order->orderBillAddress->lastname; |
68 | 68 | } |
69 | 69 | } |
70 | 70 | }) |
71 | - ->addColumn('products', function ($order) { |
|
71 | + ->addColumn('products', function($order) { |
|
72 | 72 | if ($order->products) { |
73 | 73 | return $order->products->count(); |
74 | 74 | } |
75 | 75 | }) |
76 | - ->addColumn('price_with_tax', function ($order) { |
|
76 | + ->addColumn('price_with_tax', function($order) { |
|
77 | 77 | $money = '€ '.$order->getPriceWithTaxNumberFormat(); |
78 | 78 | return $money; |
79 | 79 | }) |
80 | - ->addColumn('paymentMethod', function ($order) { |
|
80 | + ->addColumn('paymentMethod', function($order) { |
|
81 | 81 | if ($order->orderPaymentMethod) { |
82 | 82 | return $order->orderPaymentMethod->title; |
83 | 83 | } |
84 | 84 | }) |
85 | - ->addColumn('sendingMethod', function ($order) { |
|
85 | + ->addColumn('sendingMethod', function($order) { |
|
86 | 86 | if ($order->orderSendingMethod) { |
87 | 87 | return $order->orderSendingMethod->title; |
88 | 88 | } |
89 | 89 | }) |
90 | - ->addColumn('action', function ($order) { |
|
90 | + ->addColumn('action', function($order) { |
|
91 | 91 | $download = '<a href="/admin/order/'.$order->id.'/download" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Download</a> '; |
92 | 92 | $links = '<a href="/admin/order/'.$order->id.'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Show</a> '.$download; |
93 | 93 |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | public function index() |
24 | 24 | { |
25 | 25 | if (Request::wantsJson()) { |
26 | - $query = UserService::getModel()->select(['id','email', 'username']); |
|
27 | - $datatables = \DataTables::of($query)->addColumn('action', function ($query) { |
|
26 | + $query = UserService::getModel()->select(['id', 'email', 'username']); |
|
27 | + $datatables = \DataTables::of($query)->addColumn('action', function($query) { |
|
28 | 28 | $deleteLink = \Form::deleteajax(url()->route('user.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
29 | 29 | $links = '<a href="'.url()->route('user.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
30 | 30 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | public function store() |
47 | 47 | { |
48 | - $result = UserService::signup(Request::all()); |
|
48 | + $result = UserService::signup(Request::all()); |
|
49 | 49 | return UserService::notificationRedirect('user.index', $result, 'The user was inserted.'); |
50 | 50 | } |
51 | 51 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | $shop = ShopService::find($shopId); |
76 | - $result = UserService::updateShopProfileById($shop, $id); |
|
76 | + $result = UserService::updateShopProfileById($shop, $id); |
|
77 | 77 | Notification::success('The shop changed.'); |
78 | 78 | return redirect()->route('shop.index'); |
79 | 79 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $id = auth()->id(); |
85 | 85 | } |
86 | 86 | |
87 | - $result = UserService::updateProfileById(Request::all(), Request::file('avatar'), $id); |
|
87 | + $result = UserService::updateProfileById(Request::all(), Request::file('avatar'), $id); |
|
88 | 88 | return UserService::notificationRedirect('user.index', $result, 'The user was updated.'); |
89 | 89 | } |
90 | 90 | |
@@ -106,13 +106,13 @@ discard block |
||
106 | 106 | |
107 | 107 | public function update($id) |
108 | 108 | { |
109 | - $result = UserService::updateById(Request::all(), Request::file('avatar'), $id); |
|
109 | + $result = UserService::updateById(Request::all(), Request::file('avatar'), $id); |
|
110 | 110 | return UserService::notificationRedirect('user.index', $result, 'The user was updated.'); |
111 | 111 | } |
112 | 112 | |
113 | 113 | public function destroy($id) |
114 | 114 | { |
115 | - $result = UserService::destroy($id); |
|
115 | + $result = UserService::destroy($id); |
|
116 | 116 | |
117 | 117 | if ($result) { |
118 | 118 | Notification::success('The user was deleted.'); |
@@ -26,23 +26,23 @@ 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()->where('product_id', '=', $productId); |
33 | 33 | |
34 | - $datatables = \DataTables::of($query)->addColumn('action', function ($query) use ($productId) { |
|
34 | + $datatables = \DataTables::of($query)->addColumn('action', function($query) use ($productId) { |
|
35 | 35 | $deleteLink = \Form::deleteajax(url()->route('product-combination.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
36 | 36 | $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; |
37 | 37 | |
38 | 38 | return $links; |
39 | 39 | }) |
40 | 40 | |
41 | - ->addColumn('amount', function ($query) { |
|
41 | + ->addColumn('amount', function($query) { |
|
42 | 42 | 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.'">'; |
43 | 43 | }) |
44 | 44 | |
45 | - ->addColumn('price', function ($query) { |
|
45 | + ->addColumn('price', function($query) { |
|
46 | 46 | $result = 0; |
47 | 47 | if ($query->price) { |
48 | 48 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | 'amount' => $query->amount |
92 | 92 | ); |
93 | 93 | |
94 | - $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
94 | + $result = '€ '.$output['orginal_price_ex_tax_number_format'].' / € '.$output['orginal_price_inc_tax_number_format']; |
|
95 | 95 | |
96 | 96 | |
97 | 97 | if ($query->discount_value) { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | return $result; |
103 | 103 | }) |
104 | 104 | |
105 | - ->addColumn('combinations', function ($query) use ($productId) { |
|
105 | + ->addColumn('combinations', function($query) use ($productId) { |
|
106 | 106 | $items = array(); |
107 | 107 | foreach ($query->combinations as $row) { |
108 | 108 | $items[] = $row->attribute->attributeGroup->title.': '.$row->attribute->value; |
@@ -147,8 +147,8 @@ discard block |
||
147 | 147 | |
148 | 148 | public function store(Request $request, $productId) |
149 | 149 | { |
150 | - $result = ProductCombinationService::create($request->all(), $productId); |
|
151 | - if($result) { |
|
150 | + $result = ProductCombinationService::create($request->all(), $productId); |
|
151 | + if ($result) { |
|
152 | 152 | return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product extra fields are updated.'); |
153 | 153 | } |
154 | 154 | |
@@ -184,14 +184,14 @@ discard block |
||
184 | 184 | public function update(Request $request, $productId, $id) |
185 | 185 | { |
186 | 186 | |
187 | - $result = ProductCombinationService::updateById($request->all(), $productId, $id); |
|
187 | + $result = ProductCombinationService::updateById($request->all(), $productId, $id); |
|
188 | 188 | return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product combinations are updated.'); |
189 | 189 | |
190 | 190 | } |
191 | 191 | |
192 | 192 | public function destroy($productId, $id) |
193 | 193 | { |
194 | - $result = ProductCombinationService::destroy($id); |
|
194 | + $result = ProductCombinationService::destroy($id); |
|
195 | 195 | |
196 | 196 | if ($result) { |
197 | 197 | Notification::success('The product combination is deleted.'); |