@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | 'name', 'value'] |
| 22 | 22 | )->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
| 23 | 23 | |
| 24 | - $datatables = Datatables::of($query)->addColumn('action', function ($query) { |
|
| 24 | + $datatables = Datatables::of($query)->addColumn('action', function($query) { |
|
| 25 | 25 | $deleteLink = Form::deleteajax(url()->route('general-setting.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger')); |
| 26 | 26 | $links = '<a href="'.url()->route('general-setting.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
| 27 | 27 | return $links; |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | public function store(Request $request) |
| 42 | 42 | { |
| 43 | - $result = GeneralSettingService::create($request->all()); |
|
| 43 | + $result = GeneralSettingService::create($request->all()); |
|
| 44 | 44 | return GeneralSettingService::notificationRedirect('general-setting.index', $result, 'The general setting was inserted.'); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -51,13 +51,13 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | public function update(Request $request, $generalSettingId) |
| 53 | 53 | { |
| 54 | - $result = GeneralSettingService::updateById($request->all(), $generalSettingId); |
|
| 54 | + $result = GeneralSettingService::updateById($request->all(), $generalSettingId); |
|
| 55 | 55 | return GeneralSettingService::notificationRedirect('general-setting.index', $result, 'The general setting was updated.'); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | public function destroy($generalSettingId) |
| 59 | 59 | { |
| 60 | - $result = GeneralSettingService::destroy($generalSettingId); |
|
| 60 | + $result = GeneralSettingService::destroy($generalSettingId); |
|
| 61 | 61 | if ($result) { |
| 62 | 62 | Notification::error('The general setting was deleted.'); |
| 63 | 63 | return redirect()->route('general-setting.index'); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | ->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
| 28 | 28 | |
| 29 | 29 | $datatables = Datatables::of($query) |
| 30 | - ->addColumn('action', function ($query) { |
|
| 30 | + ->addColumn('action', function($query) { |
|
| 31 | 31 | $deleteLink = Form::deleteajax(url()->route('content-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
| 32 | 32 | $links = '<a href="'.url()->route('content-group.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 33 | 33 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | public function store(Request $request) |
| 49 | 49 | { |
| 50 | - $result = ContentService::createGroup($request->all()); |
|
| 50 | + $result = ContentService::createGroup($request->all()); |
|
| 51 | 51 | return ContentService::notificationRedirect('content-group.index', $result, 'The content group was inserted.'); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | public function update(Request $request, $contentGroupId) |
| 60 | 60 | { |
| 61 | - $result = ContentService::updateGroupById($request->all(), $contentGroupId); |
|
| 61 | + $result = ContentService::updateGroupById($request->all(), $contentGroupId); |
|
| 62 | 62 | return ContentService::notificationRedirect('content-group.index', $result, 'The content group was updated.'); |
| 63 | 63 | } |
| 64 | 64 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public function destroy($contentGroupId) |
| 71 | 71 | { |
| 72 | - $result = ContentService::destroyGroup($contentGroupId); |
|
| 72 | + $result = ContentService::destroyGroup($contentGroupId); |
|
| 73 | 73 | |
| 74 | 74 | if ($result) { |
| 75 | 75 | Notification::success('The content was deleted.'); |
@@ -21,10 +21,10 @@ discard block |
||
| 21 | 21 | { |
| 22 | 22 | if ($request->wantsJson()) { |
| 23 | 23 | $brand = BrandService::getModel() |
| 24 | - ->select(['id', 'rank','title']) |
|
| 24 | + ->select(['id', 'rank', 'title']) |
|
| 25 | 25 | ->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
| 26 | 26 | |
| 27 | - $datatables = Datatables::of($brand)->addColumn('action', function ($query) { |
|
| 27 | + $datatables = Datatables::of($brand)->addColumn('action', function($query) { |
|
| 28 | 28 | $deleteLink = Form::deleteajax(url()->route('brand.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'), $query->title); |
| 29 | 29 | $links = '<a href="'.url()->route('brand.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 30 | 30 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | public function store(Request $request) |
| 46 | 46 | { |
| 47 | - $result = BrandService::create($request->all()); |
|
| 47 | + $result = BrandService::create($request->all()); |
|
| 48 | 48 | return BrandService::notificationRedirect('brand.index', $result, 'The brand was inserted.'); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -55,13 +55,13 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | public function update(Request $request, $brandId) |
| 57 | 57 | { |
| 58 | - $result = BrandService::updateById($request->all(), $brandId); |
|
| 58 | + $result = BrandService::updateById($request->all(), $brandId); |
|
| 59 | 59 | return BrandService::notificationRedirect('brand.index', $result, 'The brand was updated.'); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | public function destroy($brandId) |
| 63 | 63 | { |
| 64 | - $result = BrandService::destroy($brandId); |
|
| 64 | + $result = BrandService::destroy($brandId); |
|
| 65 | 65 | if ($result) { |
| 66 | 66 | Notification::error('The brand was deleted.'); |
| 67 | 67 | return redirect()->route('brand.index'); |
@@ -36,10 +36,10 @@ discard block |
||
| 36 | 36 | ->where('faq_item.shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
| 37 | 37 | |
| 38 | 38 | $datatables = Datatables::of($query) |
| 39 | - ->addColumn('faqitemgroup', function ($query) { |
|
| 39 | + ->addColumn('faqitemgroup', function($query) { |
|
| 40 | 40 | return $query->grouptitle; |
| 41 | 41 | }) |
| 42 | - ->addColumn('action', function ($query) { |
|
| 42 | + ->addColumn('action', function($query) { |
|
| 43 | 43 | $deleteLink = Form::deleteajax(url()->route('faq.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
| 44 | 44 | $links = '<a href="'.url()->route('faq.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 45 | 45 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | public function store(Request $request) |
| 63 | 63 | { |
| 64 | - $result = FaqService::create($request->all()); |
|
| 64 | + $result = FaqService::create($request->all()); |
|
| 65 | 65 | return FaqService::notificationRedirect('faq.index', $result, 'FaqItem was inserted.'); |
| 66 | 66 | } |
| 67 | 67 | |
@@ -73,13 +73,13 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | public function update(Request $request, $faqId) |
| 75 | 75 | { |
| 76 | - $result = FaqService::updateById($request->all(), $faqId); |
|
| 76 | + $result = FaqService::updateById($request->all(), $faqId); |
|
| 77 | 77 | return FaqService::notificationRedirect('faq.index', $result, 'FaqItem was updated.'); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | public function destroy($faqItemId) |
| 81 | 81 | { |
| 82 | - $result = FaqService::destroy($faqItemId); |
|
| 82 | + $result = FaqService::destroy($faqItemId); |
|
| 83 | 83 | |
| 84 | 84 | if ($result) { |
| 85 | 85 | Notification::success('The faq was deleted.'); |
@@ -25,12 +25,12 @@ discard block |
||
| 25 | 25 | if ($request->wantsJson()) { |
| 26 | 26 | |
| 27 | 27 | $query = ExtraFieldService::getModel() |
| 28 | - ->select(['id', 'all_products','title']) |
|
| 28 | + ->select(['id', 'all_products', 'title']) |
|
| 29 | 29 | ->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
| 30 | 30 | |
| 31 | 31 | $datatables = Datatables::of($query) |
| 32 | 32 | |
| 33 | - ->addColumn('category', function ($query) { |
|
| 33 | + ->addColumn('category', function($query) { |
|
| 34 | 34 | if ($query->categories) { |
| 35 | 35 | $output = array(); |
| 36 | 36 | foreach ($query->categories as $categorie) { |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | } |
| 42 | 42 | }) |
| 43 | 43 | |
| 44 | - ->addColumn('action', function ($query) { |
|
| 44 | + ->addColumn('action', function($query) { |
|
| 45 | 45 | $deleteLink = Form::deleteajax(url()->route('extra-field.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
| 46 | 46 | $links = '<a href="'.url()->route('extra-field.values.index', $query->id).'" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>'.$query->values->count().' values</a> |
| 47 | 47 | <a href="'.url()->route('extra-field.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | public function store(Request $request) |
| 65 | 65 | { |
| 66 | - $result = ExtraFieldService::create($request->all()); |
|
| 66 | + $result = ExtraFieldService::create($request->all()); |
|
| 67 | 67 | return ExtraFieldService::notificationRedirect('extra-field.index', $result, 'The extra field was inserted.'); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -74,13 +74,13 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | public function update(Request $request, $id) |
| 76 | 76 | { |
| 77 | - $result = ExtraFieldService::updateById($request->all(), $id); |
|
| 77 | + $result = ExtraFieldService::updateById($request->all(), $id); |
|
| 78 | 78 | return ExtraFieldService::notificationRedirect('extra-field.index', $result, 'The extra field was updated.'); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | public function destroy($id) |
| 82 | 82 | { |
| 83 | - $result = ExtraFieldService::destroy($id); |
|
| 83 | + $result = ExtraFieldService::destroy($id); |
|
| 84 | 84 | |
| 85 | 85 | if ($result) { |
| 86 | 86 | Notification::success('Extra field was deleted.'); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | ->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id); |
| 26 | 26 | |
| 27 | 27 | $datatables = \Datatables::of($query) |
| 28 | - ->addColumn('action', function ($query) { |
|
| 28 | + ->addColumn('action', function($query) { |
|
| 29 | 29 | $deleteLink = Form::deleteajax(url()->route('coupon-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger')); |
| 30 | 30 | $links = '<a href="'.url()->route('coupon-group.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a> '.$deleteLink; |
| 31 | 31 | return $links; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | public function store(Request $request) |
| 46 | 46 | { |
| 47 | - $result = CouponService::createGroup($request->all()); |
|
| 47 | + $result = CouponService::createGroup($request->all()); |
|
| 48 | 48 | return CouponService::notificationRedirect('coupon-group.index', $result, 'The coupon group was inserted.'); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -55,13 +55,13 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | public function update(Request $request, $couponGroupId) |
| 57 | 57 | { |
| 58 | - $result = CouponService::updateGroupById($request->all(), $couponGroupId); |
|
| 58 | + $result = CouponService::updateGroupById($request->all(), $couponGroupId); |
|
| 59 | 59 | return CouponService::notificationRedirect('coupon-group.index', $result, 'The coupon group was updated.'); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | public function destroy($couponGroupId) |
| 63 | 63 | { |
| 64 | - $result = CouponService::destroyGroup($couponGroupId); |
|
| 64 | + $result = CouponService::destroyGroup($couponGroupId); |
|
| 65 | 65 | |
| 66 | 66 | if ($result) { |
| 67 | 67 | Notification::success('The coupon was deleted.'); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | public function index(Request $request) |
| 29 | 29 | { |
| 30 | 30 | if ($request->wantsJson()) { |
| 31 | - $query = CouponService::getModel()->select(['active','id', 'title', 'code']) |
|
| 31 | + $query = CouponService::getModel()->select(['active', 'id', 'title', 'code']) |
|
| 32 | 32 | ->where(CouponService::getModel()->getTable().'.shop_id', '=', auth('hideyobackend')->user()->selected_shop_id) |
| 33 | 33 | |
| 34 | 34 | |
@@ -36,12 +36,12 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | $datatables = Datatables::of($query) |
| 38 | 38 | |
| 39 | - ->filterColumn('title', function ($query, $keyword) { |
|
| 39 | + ->filterColumn('title', function($query, $keyword) { |
|
| 40 | 40 | $query->whereRaw("coupon.title like ?", ["%{$keyword}%"]); |
| 41 | 41 | }) |
| 42 | 42 | |
| 43 | - ->addColumn('action', function ($query) { |
|
| 44 | - $deleteLink = Form::deleteajax('/admin/coupon/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 43 | + ->addColumn('action', function($query) { |
|
| 44 | + $deleteLink = Form::deleteajax('/admin/coupon/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
|
| 45 | 45 | $links = '<a href="/admin/coupon/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a> '.$deleteLink; |
| 46 | 46 | |
| 47 | 47 | return $links; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | public function store(Request $request) |
| 68 | 68 | { |
| 69 | - $result = CouponService::create($request->all()); |
|
| 69 | + $result = CouponService::create($request->all()); |
|
| 70 | 70 | return CouponService::notificationRedirect('coupon.index', $result, 'The coupon was inserted.'); |
| 71 | 71 | } |
| 72 | 72 | |
@@ -86,13 +86,13 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | public function update(Request $request, $couponId) |
| 88 | 88 | { |
| 89 | - $result = CouponService::updateById($request->all(), $couponId); |
|
| 89 | + $result = CouponService::updateById($request->all(), $couponId); |
|
| 90 | 90 | return CouponService::notificationRedirect('coupon.index', $result, 'The coupon was updated.'); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | public function destroy($couponId) |
| 94 | 94 | { |
| 95 | - $result = CouponService::destroy($couponId); |
|
| 95 | + $result = CouponService::destroy($couponId); |
|
| 96 | 96 | |
| 97 | 97 | if ($result) { |
| 98 | 98 | Notification::success('The coupon was deleted.'); |
@@ -24,10 +24,10 @@ discard block |
||
| 24 | 24 | { |
| 25 | 25 | public function index(Request $request) |
| 26 | 26 | { |
| 27 | - $shop = auth('hideyobackend')->user()->shop; |
|
| 27 | + $shop = auth('hideyobackend')->user()->shop; |
|
| 28 | 28 | |
| 29 | 29 | if ($request->wantsJson()) { |
| 30 | - $shop = auth('hideyobackend')->user()->shop(); |
|
| 30 | + $shop = auth('hideyobackend')->user()->shop(); |
|
| 31 | 31 | $clients = ClientService::getModel()->select( |
| 32 | 32 | [ |
| 33 | 33 | |
@@ -38,11 +38,11 @@ discard block |
||
| 38 | 38 | $datatables = Datatables::of($clients) |
| 39 | 39 | |
| 40 | 40 | |
| 41 | - ->addColumn('last_login', function ($clients) { |
|
| 41 | + ->addColumn('last_login', function($clients) { |
|
| 42 | 42 | return date('d F H:i', strtotime($clients->last_login)); |
| 43 | 43 | }) |
| 44 | 44 | |
| 45 | - ->addColumn('action', function ($clients) { |
|
| 45 | + ->addColumn('action', function($clients) { |
|
| 46 | 46 | $deleteLink = Form::deleteajax(url()->route('client.destroy', $clients->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger')); |
| 47 | 47 | $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; |
| 48 | 48 | |
@@ -79,11 +79,11 @@ discard block |
||
| 79 | 79 | public function postActivate(Request $request, $clientId) |
| 80 | 80 | { |
| 81 | 81 | $input = $request->all(); |
| 82 | - $result = ClientService::activate($clientId); |
|
| 82 | + $result = ClientService::activate($clientId); |
|
| 83 | 83 | $shop = auth('hideyobackend')->user()->shop; |
| 84 | 84 | |
| 85 | 85 | if ($input['send_mail']) { |
| 86 | - Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) { |
|
| 86 | + Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) { |
|
| 87 | 87 | $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.'); |
| 88 | 88 | }); |
| 89 | 89 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | public function store(Request $request) |
| 105 | 105 | { |
| 106 | - $result = ClientService::create($request->all()); |
|
| 106 | + $result = ClientService::create($request->all()); |
|
| 107 | 107 | return ClientService::notificationRedirect('client.index', $result, 'The client was inserted.'); |
| 108 | 108 | } |
| 109 | 109 | |
@@ -134,24 +134,24 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | public function postExport() |
| 136 | 136 | { |
| 137 | - $result = ClientService::selectAllExport(); |
|
| 138 | - Excel::create('export', function ($excel) use ($result) { |
|
| 137 | + $result = ClientService::selectAllExport(); |
|
| 138 | + Excel::create('export', function($excel) use ($result) { |
|
| 139 | 139 | |
| 140 | - $excel->sheet('Clients', function ($sheet) use ($result) { |
|
| 140 | + $excel->sheet('Clients', function($sheet) use ($result) { |
|
| 141 | 141 | $newArray = array(); |
| 142 | 142 | foreach ($result as $row) { |
| 143 | 143 | $firstname = null; |
| 144 | - if($row->clientBillAddress) { |
|
| 144 | + if ($row->clientBillAddress) { |
|
| 145 | 145 | $firstname = $row->clientBillAddress->firstname; |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | $lastname = null; |
| 149 | - if($row->clientBillAddress) { |
|
| 149 | + if ($row->clientBillAddress) { |
|
| 150 | 150 | $lastname = $row->clientBillAddress->lastname; |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | $gender = null; |
| 154 | - if($row->clientBillAddress) { |
|
| 154 | + if ($row->clientBillAddress) { |
|
| 155 | 155 | $gender = $row->clientBillAddress->gender; |
| 156 | 156 | } |
| 157 | 157 | |
@@ -175,14 +175,14 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | public function update(Request $request, $clientId) |
| 177 | 177 | { |
| 178 | - $result = ClientService::updateById($request->all(), $clientId); |
|
| 178 | + $result = ClientService::updateById($request->all(), $clientId); |
|
| 179 | 179 | $input = $request->all(); |
| 180 | 180 | if (isset($result->id)) { |
| 181 | 181 | if ($result->active) { |
| 182 | - $shop = auth('hideyobackend')->user()->shop; |
|
| 182 | + $shop = auth('hideyobackend')->user()->shop; |
|
| 183 | 183 | |
| 184 | 184 | if ($input['send_mail']) { |
| 185 | - Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) { |
|
| 185 | + Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) { |
|
| 186 | 186 | $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.'); |
| 187 | 187 | }); |
| 188 | 188 | |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | |
| 204 | 204 | public function destroy($clientId) |
| 205 | 205 | { |
| 206 | - $result = ClientService::destroy($clientId); |
|
| 206 | + $result = ClientService::destroy($clientId); |
|
| 207 | 207 | |
| 208 | 208 | if ($result) { |
| 209 | 209 | Notification::success('The client was 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) use ($brandId) { |
|
| 31 | + ->addColumn('thumb', function($image) use ($brandId) { |
|
| 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.'); |