@@ -17,8 +17,8 @@ discard block |
||
17 | 17 | \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, |
18 | 18 | \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, |
19 | 19 | // \App\Http\Middleware\TrimStrings::class, |
20 | - \Illuminate\Session\Middleware\StartSession::class, |
|
21 | - \Illuminate\View\Middleware\ShareErrorsFromSession::class, |
|
20 | + \Illuminate\Session\Middleware\StartSession::class, |
|
21 | + \Illuminate\View\Middleware\ShareErrorsFromSession::class, |
|
22 | 22 | // \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, |
23 | 23 | ]; |
24 | 24 | |
@@ -29,21 +29,21 @@ discard block |
||
29 | 29 | */ |
30 | 30 | protected $middlewareGroups = [ |
31 | 31 | 'web' => [ |
32 | - \App\Http\Middleware\Install::class, |
|
32 | + \App\Http\Middleware\Install::class, |
|
33 | 33 | \App\Http\Middleware\EncryptCookies::class, |
34 | 34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, |
35 | 35 | // \Illuminate\Session\Middleware\StartSession::class, |
36 | 36 | // \Illuminate\Session\Middleware\AuthenticateSession::class, |
37 | 37 | // \Illuminate\View\Middleware\ShareErrorsFromSession::class, |
38 | - // \App\Http\Middleware\VerifyCsrfToken::class, |
|
38 | + // \App\Http\Middleware\VerifyCsrfToken::class, |
|
39 | 39 | \Illuminate\Routing\Middleware\SubstituteBindings::class, |
40 | 40 | |
41 | - // \App\Http\Middleware\IsInstalled::class, |
|
41 | + // \App\Http\Middleware\IsInstalled::class, |
|
42 | 42 | |
43 | 43 | ], |
44 | - 'admin' => [\App\Http\Middleware\Admin::class], |
|
45 | - 'guest' => [\App\Http\Middleware\RedirectIfAuthenticated::class], |
|
46 | - 'auth' => [\Illuminate\Auth\Middleware\Authenticate::class], |
|
44 | + 'admin' => [\App\Http\Middleware\Admin::class], |
|
45 | + 'guest' => [\App\Http\Middleware\RedirectIfAuthenticated::class], |
|
46 | + 'auth' => [\Illuminate\Auth\Middleware\Authenticate::class], |
|
47 | 47 | 'auth.basic' => [\Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class], |
48 | 48 | |
49 | 49 | 'api' => [ |
@@ -11,7 +11,7 @@ |
||
11 | 11 | | |
12 | 12 | */ |
13 | 13 | //Route::group(['middleware' => ['web']], function () { |
14 | - Route::get('/', 'HomeController@index'); |
|
14 | + Route::get('/', 'HomeController@index'); |
|
15 | 15 | |
16 | 16 | /* |
17 | 17 | * Front end |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | /* |
359 | 359 | * Api |
360 | 360 | */ |
361 | -Route::group(['prefix' => 'api'], function () { |
|
361 | +Route::group(['prefix' => 'api'], function() { |
|
362 | 362 | /* |
363 | 363 | * Unautherised requests |
364 | 364 | */ |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | Route::get('otp/verify', 'Auth\AuthController@postOtp'); |
371 | 371 | Route::get('email/verify', 'Auth\AuthController@verifyEmail'); |
372 | 372 | Route::get('resend_otp', 'Auth\AuthController@retryOTP'); |
373 | -Route::get('verify', function () { |
|
373 | +Route::get('verify', function() { |
|
374 | 374 | $user = \Session::get('user'); |
375 | 375 | if ($user) { |
376 | 376 | return view('themes.default1.user.verify', compact('user')); |
@@ -60,29 +60,29 @@ |
||
60 | 60 | public function getSlas() |
61 | 61 | { |
62 | 62 | return \Datatable::collection($this->sla->get()) |
63 | - ->addColumn('licence_id', function ($model) { |
|
63 | + ->addColumn('licence_id', function($model) { |
|
64 | 64 | $licence_name = $this->licence->where('id', $model->licence_id)->first()->name; |
65 | 65 | |
66 | 66 | return $licence_name; |
67 | 67 | }) |
68 | 68 | ->showColumns('name', 'description') |
69 | - ->addColumn('service', function ($model) { |
|
69 | + ->addColumn('service', function($model) { |
|
70 | 70 | $serviceid = $this->slaServiceRelation->where('sla_id', $model->id)->first()->service_id; |
71 | 71 | |
72 | 72 | return $this->service->where('id', $serviceid)->first()->name; |
73 | 73 | }) |
74 | - ->addColumn('organization_id', function ($model) { |
|
74 | + ->addColumn('organization_id', function($model) { |
|
75 | 75 | $name = $this->organization->where('id', $model->organization_id)->where('type', 'client')->first()->name; |
76 | 76 | |
77 | 77 | return $name; |
78 | 78 | }) |
79 | - ->addColumn('service_provider_id', function ($model) { |
|
79 | + ->addColumn('service_provider_id', function($model) { |
|
80 | 80 | $name = $this->organization->where('id', $model->service_provider_id)->where('type', 'service_provider')->first()->name; |
81 | 81 | |
82 | 82 | return $name; |
83 | 83 | }) |
84 | 84 | ->showColumns('start_date', 'end_date', 'grace_period') |
85 | - ->addColumn('action', function ($model) { |
|
85 | + ->addColumn('action', function($model) { |
|
86 | 86 | return '<a href='.url('slas/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
87 | 87 | }) |
88 | 88 | ->searchColumns('name') |
@@ -36,13 +36,13 @@ |
||
36 | 36 | public function getOrders() |
37 | 37 | { |
38 | 38 | return \Datatable::collection($this->LicencedOrg->get()) |
39 | - ->addColumn('organization', function ($model) { |
|
39 | + ->addColumn('organization', function($model) { |
|
40 | 40 | $org = $this->org->where('id', $model->organization_id)->first(); |
41 | 41 | |
42 | 42 | return '<a href='.url('organization/'.$org->id).'>'.ucfirst($org->name).'</a>'; |
43 | 43 | }) |
44 | 44 | ->showColumns('licence_name', 'licence_description', 'number_of_sla', 'price', 'payment_status') |
45 | - ->addColumn('action', function ($model) { |
|
45 | + ->addColumn('action', function($model) { |
|
46 | 46 | return '<a href='.url('licence-orders/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
47 | 47 | }) |
48 | 48 |
@@ -106,27 +106,27 @@ |
||
106 | 106 | public function getTaxTable() |
107 | 107 | { |
108 | 108 | return \DataTables::of(TaxByState::select('id', 'state', 'c_gst', 's_gst', 'i_gst', 'ut_gst')->get()) |
109 | - ->addColumn('id', function ($model) { |
|
110 | - return $model->id; |
|
111 | - }) |
|
112 | - |
|
113 | - ->addColumn('state', function ($model) { |
|
114 | - return ucfirst($model->state); |
|
115 | - }) |
|
116 | - ->addColumn('c_gst', function ($model) { |
|
117 | - return ucfirst($model->c_gst); |
|
118 | - }) |
|
119 | - ->addColumn('s_gst', function ($model) { |
|
120 | - return ucfirst($model->s_gst); |
|
121 | - }) |
|
122 | - ->addColumn('i_gst', function ($model) { |
|
123 | - return ucfirst($model->i_gst); |
|
124 | - }) |
|
125 | - ->addColumn('ut_gst', function ($model) { |
|
126 | - return ucfirst($model->ut_gst); |
|
127 | - }) |
|
128 | - ->rawColumns(['id', 'state', 'c_gst', 's_gst', 'i_gst', 'ut_gst']) |
|
129 | - ->make(true); |
|
109 | + ->addColumn('id', function ($model) { |
|
110 | + return $model->id; |
|
111 | + }) |
|
112 | + |
|
113 | + ->addColumn('state', function ($model) { |
|
114 | + return ucfirst($model->state); |
|
115 | + }) |
|
116 | + ->addColumn('c_gst', function ($model) { |
|
117 | + return ucfirst($model->c_gst); |
|
118 | + }) |
|
119 | + ->addColumn('s_gst', function ($model) { |
|
120 | + return ucfirst($model->s_gst); |
|
121 | + }) |
|
122 | + ->addColumn('i_gst', function ($model) { |
|
123 | + return ucfirst($model->i_gst); |
|
124 | + }) |
|
125 | + ->addColumn('ut_gst', function ($model) { |
|
126 | + return ucfirst($model->ut_gst); |
|
127 | + }) |
|
128 | + ->rawColumns(['id', 'state', 'c_gst', 's_gst', 'i_gst', 'ut_gst']) |
|
129 | + ->make(true); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |
@@ -70,33 +70,33 @@ discard block |
||
70 | 70 | public function getTax() |
71 | 71 | { |
72 | 72 | return \DataTables::of($this->tax->select('id', 'tax_classes_id', 'name', 'country', 'state', 'rate')->get()) |
73 | - ->addColumn('checkbox', function ($model) { |
|
73 | + ->addColumn('checkbox', function($model) { |
|
74 | 74 | return "<input type='checkbox' class='tax_checkbox' value=".$model->id.' name=select[] id=check>'; |
75 | 75 | }) |
76 | - ->addColumn('tax_classes_id', function ($model) { |
|
76 | + ->addColumn('tax_classes_id', function($model) { |
|
77 | 77 | return ucfirst($this->tax_class->where('id', $model->tax_classes_id)->first()->name); |
78 | 78 | }) |
79 | - ->addColumn('name', function ($model) { |
|
79 | + ->addColumn('name', function($model) { |
|
80 | 80 | return ucfirst($model->name); |
81 | 81 | }) |
82 | 82 | |
83 | 83 | // ->showColumns('name', 'level') |
84 | - ->addColumn('country', function ($model) { |
|
84 | + ->addColumn('country', function($model) { |
|
85 | 85 | if ($this->country->where('country_code_char2', $model->country)->first()) { |
86 | 86 | return ucfirst($this->country->where('country_code_char2', $model->country)->first()->country_name); |
87 | 87 | } |
88 | 88 | }) |
89 | - ->addColumn('state', function ($model) { |
|
89 | + ->addColumn('state', function($model) { |
|
90 | 90 | if ($this->state->where('state_subdivision_code', $model->state)->first()) { |
91 | 91 | return $this->state->where('state_subdivision_code', $model->state)->first()->state_subdivision_name; |
92 | 92 | } |
93 | 93 | }) |
94 | - ->addColumn('rate', function ($model) { |
|
94 | + ->addColumn('rate', function($model) { |
|
95 | 95 | return $model->rate; |
96 | 96 | }) |
97 | 97 | |
98 | 98 | // ->showColumns('rate') |
99 | - ->addColumn('action', function ($model) { |
|
99 | + ->addColumn('action', function($model) { |
|
100 | 100 | return '<a href='.url('tax/'.$model->id.'/edit')." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' style='color:white;'> </i> Edit</a>"; |
101 | 101 | }) |
102 | 102 | ->rawColumns(['checkbox', 'tax_classes_id', 'name', 'country', 'state', 'rate', 'action']) |
@@ -106,26 +106,26 @@ discard block |
||
106 | 106 | public function getTaxTable() |
107 | 107 | { |
108 | 108 | return \DataTables::of(TaxByState::select('id', 'state', 'c_gst', 's_gst', 'i_gst', 'ut_gst')->get()) |
109 | - ->addColumn('id', function ($model) { |
|
109 | + ->addColumn('id', function($model) { |
|
110 | 110 | return $model->id; |
111 | 111 | }) |
112 | 112 | |
113 | - ->addColumn('state', function ($model) { |
|
113 | + ->addColumn('state', function($model) { |
|
114 | 114 | return ucfirst($model->state); |
115 | 115 | }) |
116 | - ->addColumn('c_gst', function ($model) { |
|
116 | + ->addColumn('c_gst', function($model) { |
|
117 | 117 | return ucfirst($model->c_gst); |
118 | 118 | }) |
119 | - ->addColumn('s_gst', function ($model) { |
|
119 | + ->addColumn('s_gst', function($model) { |
|
120 | 120 | return ucfirst($model->s_gst); |
121 | 121 | }) |
122 | - ->addColumn('i_gst', function ($model) { |
|
122 | + ->addColumn('i_gst', function($model) { |
|
123 | 123 | return ucfirst($model->i_gst); |
124 | 124 | }) |
125 | - ->addColumn('ut_gst', function ($model) { |
|
125 | + ->addColumn('ut_gst', function($model) { |
|
126 | 126 | return ucfirst($model->ut_gst); |
127 | 127 | }) |
128 | - ->rawColumns(['id', 'state', 'c_gst', 's_gst', 'i_gst', 'ut_gst']) |
|
128 | + ->rawColumns(['id', 'state', 'c_gst', 's_gst', 'i_gst', 'ut_gst']) |
|
129 | 129 | ->make(true); |
130 | 130 | } |
131 | 131 |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | ->addColumn('action', function ($model) { |
87 | 87 | return '<a href='.url('promotions/'.$model->id.'/edit')." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' style='color:white;'> </i> Edit</a>"; |
88 | 88 | }) |
89 | - ->rawColumns(['checkbox', 'code', 'products', 'action']) |
|
89 | + ->rawColumns(['checkbox', 'code', 'products', 'action']) |
|
90 | 90 | |
91 | 91 | ->make(true); |
92 | 92 | } |
@@ -301,12 +301,12 @@ discard block |
||
301 | 301 | |
302 | 302 | $userId = \Auth::user()->id; |
303 | 303 | \Cart::update($productid, [ |
304 | - 'id' => $productid, |
|
305 | - 'price' => $value, |
|
306 | - 'conditions' => $coupon, |
|
304 | + 'id' => $productid, |
|
305 | + 'price' => $value, |
|
306 | + 'conditions' => $coupon, |
|
307 | 307 | |
308 | - // new item price, price can also be a string format like so: '98.67' |
|
309 | - ]); |
|
308 | + // new item price, price can also be a string format like so: '98.67' |
|
309 | + ]); |
|
310 | 310 | $items = \Cart::getContent(); |
311 | 311 | \Session::put('items', $items); |
312 | 312 |
@@ -62,16 +62,16 @@ discard block |
||
62 | 62 | $new_promotion = $this->promotion->select('code', 'type', 'id')->get(); |
63 | 63 | |
64 | 64 | return\ DataTables::of($new_promotion) |
65 | - ->addColumn('checkbox', function ($model) { |
|
65 | + ->addColumn('checkbox', function($model) { |
|
66 | 66 | return "<input type='checkbox' class='promotion_checkbox' value=".$model->id.' name=select[] id=check>'; |
67 | 67 | }) |
68 | - ->addColumn('code', function ($model) { |
|
68 | + ->addColumn('code', function($model) { |
|
69 | 69 | return ucfirst($model->code); |
70 | 70 | }) |
71 | - ->addColumn('type', function ($model) { |
|
71 | + ->addColumn('type', function($model) { |
|
72 | 72 | return $this->type->where('id', $model->type)->first()->name; |
73 | 73 | }) |
74 | - ->addColumn('products', function ($model) { |
|
74 | + ->addColumn('products', function($model) { |
|
75 | 75 | $selected = $this->promoRelation->select('product_id')->where('promotion_id', $model->id)->get(); |
76 | 76 | |
77 | 77 | foreach ($selected as $key => $select) { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | return 'None'; |
84 | 84 | } |
85 | 85 | }) |
86 | - ->addColumn('action', function ($model) { |
|
86 | + ->addColumn('action', function($model) { |
|
87 | 87 | return '<a href='.url('promotions/'.$model->id.'/edit')." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' style='color:white;'> </i> Edit</a>"; |
88 | 88 | }) |
89 | 89 | ->rawColumns(['checkbox', 'code', 'products', 'action']) |
@@ -33,17 +33,17 @@ |
||
33 | 33 | public function getCurrency() |
34 | 34 | { |
35 | 35 | return \DataTables::of($this->currency->select('name', 'id')->where('id', '!=', 1)->get()) |
36 | - ->addColumn('checkbox', function ($model) { |
|
36 | + ->addColumn('checkbox', function($model) { |
|
37 | 37 | return "<input type='checkbox' class='currency_checkbox' value=".$model->id.' name=select[] id=check>'; |
38 | 38 | }) |
39 | - ->addColumn('name', function ($model) { |
|
39 | + ->addColumn('name', function($model) { |
|
40 | 40 | return $model->name; |
41 | 41 | }) |
42 | - ->addColumn('base_conversion', function ($model) { |
|
42 | + ->addColumn('base_conversion', function($model) { |
|
43 | 43 | return $model->base_conversion; |
44 | 44 | }) |
45 | 45 | // ->showColumns('name', 'base_conversion') |
46 | - ->addColumn('action', function ($model) { |
|
46 | + ->addColumn('action', function($model) { |
|
47 | 47 | //return "<a href=" . url('products/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a>"; |
48 | 48 | //return "<a href=#create class='btn btn-primary pull-right' data-toggle=modal data-target=#edit".$model->id.">".\Lang::get('message.create')."</a>". include base_path(). '/resources/views/themes/default1/payment/currency/edit.blade.php'; |
49 | 49 |
@@ -42,11 +42,11 @@ discard block |
||
42 | 42 | public function getAddons() |
43 | 43 | { |
44 | 44 | return \Datatable::collection($this->addon->get()) |
45 | - ->addColumn('#', function ($model) { |
|
45 | + ->addColumn('#', function($model) { |
|
46 | 46 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
47 | 47 | }) |
48 | 48 | ->showColumns('name', 'regular_price', 'selling_price') |
49 | - ->addColumn('associated', function ($model) { |
|
49 | + ->addColumn('associated', function($model) { |
|
50 | 50 | $relations = new ProductAddonRelation(); |
51 | 51 | $relations = $relations->where('addon_id', $model->id)->get(); |
52 | 52 | $products = []; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | return implode(',', $products); |
58 | 58 | }) |
59 | - ->addColumn('action', function ($model) { |
|
59 | + ->addColumn('action', function($model) { |
|
60 | 60 | return '<a href='.url('addons/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
61 | 61 | }) |
62 | 62 | ->searchColumns('name') |
@@ -47,11 +47,11 @@ discard block |
||
47 | 47 | public function getBundles() |
48 | 48 | { |
49 | 49 | return \Datatable::collection($this->bundle->select('id', 'name', 'valid_from', 'valid_till', 'uses', 'maximum_uses')->get()) |
50 | - ->addColumn('#', function ($model) { |
|
50 | + ->addColumn('#', function($model) { |
|
51 | 51 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
52 | 52 | }) |
53 | 53 | ->showColumns('name', 'valid_from', 'valid_till', 'uses', 'maximum_uses') |
54 | - ->addColumn('item', function ($model) { |
|
54 | + ->addColumn('item', function($model) { |
|
55 | 55 | $name = $this->relation->where('bundle_id', $model->id)->pluck('product_id'); |
56 | 56 | //dd($name); |
57 | 57 | $result = []; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | //dd($result); |
62 | 62 | return implode(',', $result); |
63 | 63 | }) |
64 | - ->addColumn('action', function ($model) { |
|
64 | + ->addColumn('action', function($model) { |
|
65 | 65 | return '<a href='.url('bundles/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
66 | 66 | }) |
67 | 67 | ->searchColumns('name', 'item') |