@@ -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.'); |
@@ -29,10 +29,10 @@ discard block |
||
29 | 29 | |
30 | 30 | $datatables = Datatables::of($image) |
31 | 31 | |
32 | - ->addColumn('thumb', function ($image) { |
|
32 | + ->addColumn('thumb', function($image) { |
|
33 | 33 | return '<img src="/files/news/100x100/'.$image->news_id.'/'.$image->file.'" />'; |
34 | 34 | }) |
35 | - ->addColumn('action', function ($image) use ($newsId) { |
|
35 | + ->addColumn('action', function($image) use ($newsId) { |
|
36 | 36 | $deleteLink = Form::deleteajax(url()->route('news-images.destroy', array('newsId' => $newsId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
37 | 37 | $links = '<a href="'.url()->route('news-images.edit', array('newsId' => $newsId, 'id' => $image->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
38 | 38 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | public function store(Request $request, $newsId) |
55 | 55 | { |
56 | - $result = NewsService::createImage($request->all(), $newsId); |
|
56 | + $result = NewsService::createImage($request->all(), $newsId); |
|
57 | 57 | return NewsService::notificationRedirect(array('news-images.index', $newsId), $result, 'The news image was inserted.'); |
58 | 58 | } |
59 | 59 | |
@@ -65,13 +65,13 @@ discard block |
||
65 | 65 | |
66 | 66 | public function update(Request $request, $newsId, $newsImageId) |
67 | 67 | { |
68 | - $result = NewsService::updateImageById($request->all(), $newsId, $newsImageId); |
|
68 | + $result = NewsService::updateImageById($request->all(), $newsId, $newsImageId); |
|
69 | 69 | return NewsService::notificationRedirect(array('news-images.index', $newsId), $result, 'The news image was updated.'); |
70 | 70 | } |
71 | 71 | |
72 | 72 | public function destroy($newsId, $newsImageId) |
73 | 73 | { |
74 | - $result = NewsService::destroyImage($newsImageId); |
|
74 | + $result = NewsService::destroyImage($newsImageId); |
|
75 | 75 | |
76 | 76 | if ($result) { |
77 | 77 | Notification::success('The file 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.'); |
@@ -22,11 +22,11 @@ |
||
22 | 22 | $query = $this->error->getModel()->select( |
23 | 23 | [ |
24 | 24 | 'id', |
25 | - 'class', 'file' , 'status_code', 'line', 'message', 'url', 'method'] |
|
25 | + 'class', 'file', 'status_code', 'line', 'message', 'url', 'method'] |
|
26 | 26 | ); |
27 | 27 | |
28 | - $datatables = \Datatables::of($query)->addColumn('action', function ($query) { |
|
29 | - $deleteLink = \Form::deleteajax('/admin/general-setting/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
28 | + $datatables = \Datatables::of($query)->addColumn('action', function($query) { |
|
29 | + $deleteLink = \Form::deleteajax('/admin/general-setting/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
30 | 30 | $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; |
31 | 31 | |
32 | 32 | return $links; |