@@ -32,13 +32,13 @@ discard block |
||
32 | 32 | $query = ProductRelatedProductService::getModel()->where('product_id', '=', $productId); |
33 | 33 | |
34 | 34 | $datatables = \Datatables::of($query) |
35 | - ->addColumn('related', function ($query) use ($productId) { |
|
35 | + ->addColumn('related', function($query) use ($productId) { |
|
36 | 36 | return $query->RelatedProduct->title; |
37 | 37 | }) |
38 | - ->addColumn('product', function ($query) use ($productId) { |
|
38 | + ->addColumn('product', function($query) use ($productId) { |
|
39 | 39 | return $query->Product->title; |
40 | 40 | }) |
41 | - ->addColumn('action', function ($query) use ($productId) { |
|
41 | + ->addColumn('action', function($query) use ($productId) { |
|
42 | 42 | $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')); |
43 | 43 | |
44 | 44 | return $deleteLink; |
@@ -60,13 +60,13 @@ discard block |
||
60 | 60 | |
61 | 61 | public function store($productId) |
62 | 62 | { |
63 | - $result = ProductRelatedProductService::create($this->request->all(), $productId); |
|
63 | + $result = ProductRelatedProductService::create($this->request->all(), $productId); |
|
64 | 64 | return redirect()->route('product.related-product.index', $productId); |
65 | 65 | } |
66 | 66 | |
67 | 67 | public function destroy($productId, $productRelatedProductId) |
68 | 68 | { |
69 | - $result = ProductRelatedProductService::destroy($productRelatedProductId); |
|
69 | + $result = ProductRelatedProductService::destroy($productRelatedProductId); |
|
70 | 70 | |
71 | 71 | if ($result) { |
72 | 72 | Notification::success('The related product is deleted.'); |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | )->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
35 | 35 | |
36 | 36 | $datatables = Datatables::of($query) |
37 | - ->addColumn('action', function ($query) { |
|
38 | - $deleteLink = Form::deleteajax('/admin/order-status-email-template/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
37 | + ->addColumn('action', function($query) { |
|
38 | + $deleteLink = Form::deleteajax('/admin/order-status-email-template/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
39 | 39 | $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; |
40 | 40 | |
41 | 41 | return $links; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | public function store() |
56 | 56 | { |
57 | - $result = OrderStatusEmailTemplateService::create($this->request->all()); |
|
57 | + $result = OrderStatusEmailTemplateService::create($this->request->all()); |
|
58 | 58 | return OrderStatusEmailTemplateService::notificationRedirect('order-status-email-template.index', $result, 'The template was inserted.'); |
59 | 59 | } |
60 | 60 | |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | |
71 | 71 | public function update($templateId) |
72 | 72 | { |
73 | - $result = OrderStatusEmailTemplateService::updateById($this->request->all(), $templateId); |
|
73 | + $result = OrderStatusEmailTemplateService::updateById($this->request->all(), $templateId); |
|
74 | 74 | return OrderStatusEmailTemplateService::notificationRedirect('order-status-email-template.index', $result, 'The template was updated.'); |
75 | 75 | } |
76 | 76 | |
77 | 77 | public function destroy($templateId) |
78 | 78 | { |
79 | - $result = OrderStatusEmailTemplateService::destroy($templateId); |
|
79 | + $result = OrderStatusEmailTemplateService::destroy($templateId); |
|
80 | 80 | |
81 | 81 | if ($result) { |
82 | 82 | Notification::success('template was deleted.'); |
@@ -26,18 +26,18 @@ discard block |
||
26 | 26 | if ($request->wantsJson()) { |
27 | 27 | |
28 | 28 | $productCategory = ProductCategoryService::getModel()->select( |
29 | - ['id', 'active','shop_id','parent_id', 'redirect_product_category_id','title', 'meta_title', 'meta_description'] |
|
29 | + ['id', 'active', 'shop_id', 'parent_id', 'redirect_product_category_id', 'title', 'meta_title', 'meta_description'] |
|
30 | 30 | )->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
31 | 31 | |
32 | 32 | $datatables = Datatables::of($productCategory) |
33 | 33 | |
34 | - ->addColumn('image', function ($productCategory) { |
|
34 | + ->addColumn('image', function($productCategory) { |
|
35 | 35 | if ($productCategory->productCategoryImages->count()) { |
36 | 36 | return '<img src="/files/product_category/100x100/'.$productCategory->id.'/'.$productCategory->productCategoryImages->first()->file.'" />'; |
37 | 37 | } |
38 | 38 | }) |
39 | 39 | |
40 | - ->addColumn('title', function ($productCategory) { |
|
40 | + ->addColumn('title', function($productCategory) { |
|
41 | 41 | |
42 | 42 | $categoryTitle = $productCategory->title; |
43 | 43 | if ($productCategory->refProductCategory) { |
@@ -51,17 +51,17 @@ discard block |
||
51 | 51 | return $categoryTitle; |
52 | 52 | }) |
53 | 53 | |
54 | - ->addColumn('products', function ($productCategory) { |
|
54 | + ->addColumn('products', function($productCategory) { |
|
55 | 55 | return $productCategory->products->count(); |
56 | 56 | }) |
57 | - ->addColumn('parent', function ($productCategory) { |
|
57 | + ->addColumn('parent', function($productCategory) { |
|
58 | 58 | |
59 | 59 | if ($productCategory->parent()->count()) { |
60 | 60 | return $productCategory->parent()->first()->title; |
61 | 61 | } |
62 | 62 | }) |
63 | 63 | |
64 | - ->addColumn('active', function ($product) { |
|
64 | + ->addColumn('active', function($product) { |
|
65 | 65 | if ($product->active) { |
66 | 66 | return '<a href="#" class="change-active" data-url="/admin/product-category/change-active/'.$product->id.'"><span class="glyphicon glyphicon-ok icon-green"></span></a>'; |
67 | 67 | } |
@@ -70,12 +70,12 @@ discard block |
||
70 | 70 | }) |
71 | 71 | |
72 | 72 | |
73 | - ->addColumn('seo', function ($productCategory) { |
|
73 | + ->addColumn('seo', function($productCategory) { |
|
74 | 74 | if ($productCategory->meta_title && $productCategory->meta_description) { |
75 | 75 | return '<i class="fa fa-check"></i>'; |
76 | 76 | } |
77 | 77 | }) |
78 | - ->addColumn('action', function ($productCategory) { |
|
78 | + ->addColumn('action', function($productCategory) { |
|
79 | 79 | $deleteLink = Form::deleteajax(url()->route('product-category.destroy', $productCategory->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'), $productCategory->title); |
80 | 80 | $links = '<a href="'.url()->route('product-category.edit', $productCategory->id).'" class="btn btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
81 | 81 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | public function store(Request $request) |
138 | 138 | { |
139 | - $result = ProductCategoryService::create($this->generateInput($request->all())); |
|
139 | + $result = ProductCategoryService::create($this->generateInput($request->all())); |
|
140 | 140 | return ProductCategoryService::notificationRedirect('product-category.index', $result, 'The product category was inserted.'); |
141 | 141 | } |
142 | 142 | |
@@ -160,13 +160,13 @@ discard block |
||
160 | 160 | |
161 | 161 | public function update(Request $request, $productCategoryId) |
162 | 162 | { |
163 | - $result = ProductCategoryService::updateById($this->generateInput($request->all()), $productCategoryId); |
|
163 | + $result = ProductCategoryService::updateById($this->generateInput($request->all()), $productCategoryId); |
|
164 | 164 | return ProductCategoryService::notificationRedirect('product-category.index', $result, 'The product category was updated.'); |
165 | 165 | } |
166 | 166 | |
167 | 167 | public function destroy($productCategoryId) |
168 | 168 | { |
169 | - $result = ProductCategoryService::destroy($productCategoryId); |
|
169 | + $result = ProductCategoryService::destroy($productCategoryId); |
|
170 | 170 | |
171 | 171 | if ($result) { |
172 | 172 | Notification::success('Category was deleted.'); |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | } elseif ($parent->children()->count()) { |
237 | 237 | $node->makeLastChildOf($parent); |
238 | 238 | foreach ($parent->children()->get() as $key => $row) { |
239 | - $positionKey = $position - 1; |
|
239 | + $positionKey = $position - 1; |
|
240 | 240 | if ($key == $positionKey) { |
241 | 241 | $node->moveToRightOf($row); |
242 | 242 | } |
@@ -24,15 +24,15 @@ discard block |
||
24 | 24 | { |
25 | 25 | public function __construct(Request $request) |
26 | 26 | { |
27 | - $this->request = $request; |
|
27 | + $this->request = $request; |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | public function index() |
31 | 31 | { |
32 | - $shop = auth('hideyobackend')->user()->shop; |
|
32 | + $shop = auth('hideyobackend')->user()->shop; |
|
33 | 33 | |
34 | 34 | if ($this->request->wantsJson()) { |
35 | - $shop = auth('hideyobackend')->user()->shop(); |
|
35 | + $shop = auth('hideyobackend')->user()->shop(); |
|
36 | 36 | $clients = ClientService::getModel()->select( |
37 | 37 | [ |
38 | 38 | |
@@ -43,11 +43,11 @@ discard block |
||
43 | 43 | $datatables = Datatables::of($clients) |
44 | 44 | |
45 | 45 | |
46 | - ->addColumn('last_login', function ($clients) { |
|
46 | + ->addColumn('last_login', function($clients) { |
|
47 | 47 | return date('d F H:i', strtotime($clients->last_login)); |
48 | 48 | }) |
49 | 49 | |
50 | - ->addColumn('action', function ($clients) { |
|
50 | + ->addColumn('action', function($clients) { |
|
51 | 51 | $deleteLink = Form::deleteajax(url()->route('client.destroy', $clients->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
52 | 52 | $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; |
53 | 53 | |
@@ -84,11 +84,11 @@ discard block |
||
84 | 84 | public function postActivate($clientId) |
85 | 85 | { |
86 | 86 | $input = $this->request->all(); |
87 | - $result = ClientService::activate($clientId); |
|
87 | + $result = ClientService::activate($clientId); |
|
88 | 88 | $shop = auth('hideyobackend')->user()->shop; |
89 | 89 | |
90 | 90 | if ($input['send_mail']) { |
91 | - Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) { |
|
91 | + Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) { |
|
92 | 92 | $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.'); |
93 | 93 | }); |
94 | 94 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | public function store() |
110 | 110 | { |
111 | - $result = ClientService::create($this->request->all()); |
|
111 | + $result = ClientService::create($this->request->all()); |
|
112 | 112 | return ClientService::notificationRedirect('client.index', $result, 'The client was inserted.'); |
113 | 113 | } |
114 | 114 | |
@@ -139,24 +139,24 @@ discard block |
||
139 | 139 | |
140 | 140 | public function postExport() |
141 | 141 | { |
142 | - $result = ClientService::selectAllExport(); |
|
143 | - Excel::create('export', function ($excel) use ($result) { |
|
142 | + $result = ClientService::selectAllExport(); |
|
143 | + Excel::create('export', function($excel) use ($result) { |
|
144 | 144 | |
145 | - $excel->sheet('Clients', function ($sheet) use ($result) { |
|
145 | + $excel->sheet('Clients', function($sheet) use ($result) { |
|
146 | 146 | $newArray = array(); |
147 | 147 | foreach ($result as $row) { |
148 | 148 | $firstname = null; |
149 | - if($row->clientBillAddress) { |
|
149 | + if ($row->clientBillAddress) { |
|
150 | 150 | $firstname = $row->clientBillAddress->firstname; |
151 | 151 | } |
152 | 152 | |
153 | 153 | $lastname = null; |
154 | - if($row->clientBillAddress) { |
|
154 | + if ($row->clientBillAddress) { |
|
155 | 155 | $lastname = $row->clientBillAddress->lastname; |
156 | 156 | } |
157 | 157 | |
158 | 158 | $gender = null; |
159 | - if($row->clientBillAddress) { |
|
159 | + if ($row->clientBillAddress) { |
|
160 | 160 | $gender = $row->clientBillAddress->gender; |
161 | 161 | } |
162 | 162 | |
@@ -180,14 +180,14 @@ discard block |
||
180 | 180 | |
181 | 181 | public function update($clientId) |
182 | 182 | { |
183 | - $result = ClientService::updateById($this->request->all(), $clientId); |
|
183 | + $result = ClientService::updateById($this->request->all(), $clientId); |
|
184 | 184 | $input = $this->request->all(); |
185 | 185 | if (isset($result->id)) { |
186 | 186 | if ($result->active) { |
187 | - $shop = auth('hideyobackend')->user()->shop; |
|
187 | + $shop = auth('hideyobackend')->user()->shop; |
|
188 | 188 | |
189 | 189 | if ($input['send_mail']) { |
190 | - Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) { |
|
190 | + Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) { |
|
191 | 191 | $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.'); |
192 | 192 | }); |
193 | 193 | |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | |
209 | 209 | public function destroy($clientId) |
210 | 210 | { |
211 | - $result = ClientService::destroy($clientId); |
|
211 | + $result = ClientService::destroy($clientId); |
|
212 | 212 | |
213 | 213 | if ($result) { |
214 | 214 | Notification::success('The client was deleted.'); |
@@ -30,13 +30,13 @@ discard block |
||
30 | 30 | ->select(['id', 'title', 'logo_file_name']); |
31 | 31 | $datatables = Datatables::of($query) |
32 | 32 | |
33 | - ->addColumn('action', function ($query) { |
|
33 | + ->addColumn('action', function($query) { |
|
34 | 34 | $deleteLink = Form::deleteajax(url()->route('shop.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
35 | 35 | $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; |
36 | 36 | return $links; |
37 | 37 | }) |
38 | 38 | |
39 | - ->addColumn('image', function ($query) { |
|
39 | + ->addColumn('image', function($query) { |
|
40 | 40 | if ($query->logo_file_name) { |
41 | 41 | return '<img src="http://shop.brulo.nl/files/'.$query->id.'/logo/'.$query->logo_file_name.'" />'; |
42 | 42 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | public function store() |
57 | 57 | { |
58 | - $result = ShopService::create($this->request->all()); |
|
58 | + $result = ShopService::create($this->request->all()); |
|
59 | 59 | return ShopService::notificationRedirect('shop.index', $result, 'The shop was inserted.'); |
60 | 60 | } |
61 | 61 | |
@@ -66,13 +66,13 @@ discard block |
||
66 | 66 | |
67 | 67 | public function update($shopId) |
68 | 68 | { |
69 | - $result = ShopService::updateById($this->request->all(), $shopId); |
|
69 | + $result = ShopService::updateById($this->request->all(), $shopId); |
|
70 | 70 | return ShopService::notificationRedirect('shop.index', $result, 'The shop was updated.'); |
71 | 71 | } |
72 | 72 | |
73 | 73 | public function destroy($shopId) |
74 | 74 | { |
75 | - $result = ShopService::destroy($shopId); |
|
75 | + $result = ShopService::destroy($shopId); |
|
76 | 76 | |
77 | 77 | if ($result) { |
78 | 78 | Notification::success('The shop was deleted.'); |
@@ -25,15 +25,15 @@ discard block |
||
25 | 25 | if ($request->wantsJson()) { |
26 | 26 | |
27 | 27 | $image = ProductCategoryService::getImageModel()->select( |
28 | - ['id','file', 'product_category_id'] |
|
28 | + ['id', 'file', 'product_category_id'] |
|
29 | 29 | )->where('product_category_id', '=', $productCategoryId); |
30 | 30 | |
31 | 31 | $datatables = Datatables::of($image) |
32 | 32 | |
33 | - ->addColumn('thumb', function ($image) use ($productCategoryId) { |
|
33 | + ->addColumn('thumb', function($image) use ($productCategoryId) { |
|
34 | 34 | return '<img src="/files/product_category/100x100/'.$image->product_category_id.'/'.$image->file.'" />'; |
35 | 35 | }) |
36 | - ->addColumn('action', function ($image) use ($productCategoryId) { |
|
36 | + ->addColumn('action', function($image) use ($productCategoryId) { |
|
37 | 37 | $deleteLink = Form::deleteajax(url()->route('product-category.images.destroy', array('productCategoryId' => $productCategoryId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
38 | 38 | $links = '<a href="'.url()->route('product-category.images.edit', array('productCategoryId' => $productCategoryId, 'id' => $image->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
39 | 39 | return $links; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | public function store(Request $request, $productCategoryId) |
59 | 59 | { |
60 | - $result = ProductCategoryService::createImage($request->all(), $productCategoryId); |
|
60 | + $result = ProductCategoryService::createImage($request->all(), $productCategoryId); |
|
61 | 61 | return ProductCategoryService::notificationRedirect(array('product-category.images.index', $productCategoryId), $result, 'The category image was inserted.'); |
62 | 62 | } |
63 | 63 | |
@@ -69,13 +69,13 @@ discard block |
||
69 | 69 | |
70 | 70 | public function update(Request $request, $productCategoryId, $productCategoryImageId) |
71 | 71 | { |
72 | - $result = ProductCategoryService::updateImageById($request->all(), $productCategoryId, $productCategoryImageId); |
|
72 | + $result = ProductCategoryService::updateImageById($request->all(), $productCategoryId, $productCategoryImageId); |
|
73 | 73 | return ProductCategoryService::notificationRedirect(array('product-category.images.index', $productCategoryId), $result, 'The category image was updated.'); |
74 | 74 | } |
75 | 75 | |
76 | 76 | public function destroy($productCategoryId, $productCategoryImageId) |
77 | 77 | { |
78 | - $result = ProductCategoryService::destroyImage($productCategoryImageId); |
|
78 | + $result = ProductCategoryService::destroyImage($productCategoryImageId); |
|
79 | 79 | |
80 | 80 | if ($result) { |
81 | 81 | Notification::success('The file was deleted.'); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | { |
20 | 20 | if ($this->request->wantsJson()) { |
21 | 21 | $query = TaxRateService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
22 | - $datatables = Datatables::of($query)->addColumn('action', function ($query) { |
|
22 | + $datatables = Datatables::of($query)->addColumn('action', function($query) { |
|
23 | 23 | $deleteLink = Form::deleteajax(url()->route('tax-rate.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'), $query->title); |
24 | 24 | $links = '<a href="'.url()->route('tax-rate.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
25 | 25 | return $links; |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | public function store() |
40 | 40 | { |
41 | - $result = TaxRateService::create($this->request->all()); |
|
41 | + $result = TaxRateService::create($this->request->all()); |
|
42 | 42 | return TaxRateService::notificationRedirect('tax-rate.index', $result, 'The tax rate was inserted.'); |
43 | 43 | } |
44 | 44 | |
@@ -49,13 +49,13 @@ discard block |
||
49 | 49 | |
50 | 50 | public function update($taxRateId) |
51 | 51 | { |
52 | - $result = TaxRateService::updateById($this->request->all(), $taxRateId); |
|
52 | + $result = TaxRateService::updateById($this->request->all(), $taxRateId); |
|
53 | 53 | return TaxRateService::notificationRedirect('tax-rate.index', $result, 'The tax rate was updated.'); |
54 | 54 | } |
55 | 55 | |
56 | 56 | public function destroy($taxRateId) |
57 | 57 | { |
58 | - $result = TaxRateService::destroy($taxRateId); |
|
58 | + $result = TaxRateService::destroy($taxRateId); |
|
59 | 59 | if ($result) { |
60 | 60 | Notification::error('The tax rate was deleted.'); |
61 | 61 | return redirect()->route('tax-rate.index'); |
@@ -28,15 +28,15 @@ discard block |
||
28 | 28 | if ($this->request->wantsJson()) { |
29 | 29 | |
30 | 30 | $image = BrandService::getModelImage() |
31 | - ->select(['id','file', 'brand_id']) |
|
31 | + ->select(['id', 'file', 'brand_id']) |
|
32 | 32 | ->where('brand_id', '=', $brandId); |
33 | 33 | |
34 | 34 | $datatables = Datatables::of($image) |
35 | 35 | |
36 | - ->addColumn('thumb', function ($image) use ($brandId) { |
|
36 | + ->addColumn('thumb', function($image) use ($brandId) { |
|
37 | 37 | return '<img src="'.config('hideyo.public_path').'/brand/100x100/'.$image->brand_id.'/'.$image->file.'" />'; |
38 | 38 | }) |
39 | - ->addColumn('action', function ($image) use ($brandId) { |
|
39 | + ->addColumn('action', function($image) use ($brandId) { |
|
40 | 40 | $deleteLink = Form::deleteajax(url()->route('brand.images.destroy', array('brandId' => $brandId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
41 | 41 | $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; |
42 | 42 | return $links; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | return $datatables->make(true); |
46 | 46 | } |
47 | 47 | |
48 | - return view('backend.brand_image.index')->with(array( 'brand' => $brand)); |
|
48 | + return view('backend.brand_image.index')->with(array('brand' => $brand)); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | public function create($brandId) |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | public function store($brandId) |
58 | 58 | { |
59 | - $result = BrandService::createImage($this->request->all(), $brandId); |
|
59 | + $result = BrandService::createImage($this->request->all(), $brandId); |
|
60 | 60 | return BrandService::notificationRedirect(array('brand.images.index', $brandId), $result, 'The brand image was inserted.'); |
61 | 61 | } |
62 | 62 | |
@@ -68,13 +68,13 @@ discard block |
||
68 | 68 | |
69 | 69 | public function update($brandId, $brandImageId) |
70 | 70 | { |
71 | - $result = BrandService::updateImageById($this->request->all(), $brandId, $brandImageId); |
|
71 | + $result = BrandService::updateImageById($this->request->all(), $brandId, $brandImageId); |
|
72 | 72 | return BrandService::notificationRedirect(array('brand.images.index', $brandId), $result, 'The brand image was updated.'); |
73 | 73 | } |
74 | 74 | |
75 | 75 | public function destroy($brandId, $brandImageId) |
76 | 76 | { |
77 | - $result = BrandService::destroyImage($brandImageId); |
|
77 | + $result = BrandService::destroyImage($brandImageId); |
|
78 | 78 | |
79 | 79 | if ($result) { |
80 | 80 | Notification::success('The file was deleted.'); |
@@ -36,13 +36,13 @@ discard block |
||
36 | 36 | |
37 | 37 | $datatables = Datatables::of($content) |
38 | 38 | |
39 | - ->filterColumn('title', function ($query, $keyword) { |
|
39 | + ->filterColumn('title', function($query, $keyword) { |
|
40 | 40 | $query->whereRaw("content.title like ?", ["%{$keyword}%"]); |
41 | 41 | }) |
42 | - ->addColumn('contentgroup', function ($content) { |
|
42 | + ->addColumn('contentgroup', function($content) { |
|
43 | 43 | return $content->contenttitle; |
44 | 44 | }) |
45 | - ->addColumn('action', function ($content) { |
|
45 | + ->addColumn('action', function($content) { |
|
46 | 46 | $deleteLink = Form::deleteajax(url()->route('content.destroy', $content->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
47 | 47 | $links = '<a href="'.url()->route('content.edit', $content->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
48 | 48 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | public function store(Request $request) |
64 | 64 | { |
65 | - $result = ContentService::create($request->all()); |
|
65 | + $result = ContentService::create($request->all()); |
|
66 | 66 | return ContentService::notificationRedirect('content.index', $result, 'The content was inserted.'); |
67 | 67 | } |
68 | 68 | |
@@ -73,13 +73,13 @@ discard block |
||
73 | 73 | |
74 | 74 | public function update(Request $request, $contentId) |
75 | 75 | { |
76 | - $result = ContentService::updateById($request->all(), $contentId); |
|
76 | + $result = ContentService::updateById($request->all(), $contentId); |
|
77 | 77 | return ContentService::notificationRedirect('content.index', $result, 'The content was updated.'); |
78 | 78 | } |
79 | 79 | |
80 | 80 | public function destroy(Request $request, $contentId) |
81 | 81 | { |
82 | - $result = ContentService::destroy($contentId); |
|
82 | + $result = ContentService::destroy($contentId); |
|
83 | 83 | |
84 | 84 | if ($result) { |
85 | 85 | Notification::success('The content was deleted.'); |