@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | 'name' => $name1, |
| 90 | 90 | 'type' => 'tax', |
| 91 | 91 | 'target' => 'item', |
| 92 | - 'value' => $rate1.'%', |
|
| 92 | + 'value' => $rate1 . '%', |
|
| 93 | 93 | ]); |
| 94 | 94 | } else { |
| 95 | 95 | $taxCondition1 = new \Darryldecode\Cart\CartCondition([ |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | 'name' => $name2, |
| 107 | 107 | 'type' => 'tax', |
| 108 | 108 | 'target' => 'item', |
| 109 | - 'value' => $rate2.'%', |
|
| 109 | + 'value' => $rate2 . '%', |
|
| 110 | 110 | ]); |
| 111 | 111 | } else { |
| 112 | 112 | $taxCondition2 = new \Darryldecode\Cart\CartCondition([ |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | |
| 181 | 181 | $taxConditions = $this->CheckTax($isTaxApply); |
| 182 | 182 | |
| 183 | - $items = ['id' => 'addon'.$addon->id, 'name' => $addon->name, 'price' => $addon->selling_price, 'quantity' => 1]; |
|
| 183 | + $items = ['id' => 'addon' . $addon->id, 'name' => $addon->name, 'price' => $addon->selling_price, 'quantity' => 1]; |
|
| 184 | 184 | $items = array_merge($items, $taxConditions); |
| 185 | 185 | |
| 186 | 186 | //dd($items); |
@@ -52,14 +52,14 @@ discard block |
||
| 52 | 52 | public function GetPromotion() |
| 53 | 53 | { |
| 54 | 54 | return \Datatable::collection($this->promotion->select('code', 'type', 'id')->get()) |
| 55 | - ->addColumn('#', function ($model) { |
|
| 56 | - return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
|
| 55 | + ->addColumn('#', function($model) { |
|
| 56 | + return "<input type='checkbox' value=" . $model->id . ' name=select[] id=check>'; |
|
| 57 | 57 | }) |
| 58 | 58 | ->showColumns('code') |
| 59 | - ->addColumn('type', function ($model) { |
|
| 59 | + ->addColumn('type', function($model) { |
|
| 60 | 60 | return $this->type->where('id', $model->type)->first()->name; |
| 61 | 61 | }) |
| 62 | - ->addColumn('products', function ($model) { |
|
| 62 | + ->addColumn('products', function($model) { |
|
| 63 | 63 | $selected = $this->promoRelation->select('product_id')->where('promotion_id', $model->id)->get(); |
| 64 | 64 | |
| 65 | 65 | foreach ($selected as $key => $select) { |
@@ -71,8 +71,8 @@ discard block |
||
| 71 | 71 | return 'None'; |
| 72 | 72 | } |
| 73 | 73 | }) |
| 74 | - ->addColumn('action', function ($model) { |
|
| 75 | - return '<a href='.url('promotions/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 74 | + ->addColumn('action', function($model) { |
|
| 75 | + return '<a href=' . url('promotions/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 76 | 76 | }) |
| 77 | 77 | ->searchColumns('products') |
| 78 | 78 | ->orderColumns('code') |
@@ -212,34 +212,34 @@ discard block |
||
| 212 | 212 | } else { |
| 213 | 213 | echo "<div class='alert alert-danger alert-dismissable'> |
| 214 | 214 | <i class='fa fa-ban'></i> |
| 215 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 215 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 216 | 216 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 217 | - '.\Lang::get('message.no-record').' |
|
| 217 | + '.\Lang::get('message.no-record') . ' |
|
| 218 | 218 | </div>'; |
| 219 | 219 | //echo \Lang::get('message.no-record') . ' [id=>' . $id . ']'; |
| 220 | 220 | } |
| 221 | 221 | } |
| 222 | 222 | echo "<div class='alert alert-success alert-dismissable'> |
| 223 | 223 | <i class='fa fa-ban'></i> |
| 224 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.success').' |
|
| 224 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.success') . ' |
|
| 225 | 225 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 226 | - '.\Lang::get('message.deleted-successfully').' |
|
| 226 | + '.\Lang::get('message.deleted-successfully') . ' |
|
| 227 | 227 | </div>'; |
| 228 | 228 | } else { |
| 229 | 229 | echo "<div class='alert alert-danger alert-dismissable'> |
| 230 | 230 | <i class='fa fa-ban'></i> |
| 231 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 231 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 232 | 232 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 233 | - '.\Lang::get('message.select-a-row').' |
|
| 233 | + '.\Lang::get('message.select-a-row') . ' |
|
| 234 | 234 | </div>'; |
| 235 | 235 | //echo \Lang::get('message.select-a-row'); |
| 236 | 236 | } |
| 237 | 237 | } catch (\Exception $e) { |
| 238 | 238 | echo "<div class='alert alert-danger alert-dismissable'> |
| 239 | 239 | <i class='fa fa-ban'></i> |
| 240 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 240 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 241 | 241 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 242 | - '.$e->getMessage().' |
|
| 242 | + '.$e->getMessage() . ' |
|
| 243 | 243 | </div>'; |
| 244 | 244 | } |
| 245 | 245 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | /** |
| 84 | 84 | * Store a newly created resource in storage. |
| 85 | 85 | * |
| 86 | - * @return Response |
|
| 86 | + * @return \Illuminate\Http\RedirectResponse |
|
| 87 | 87 | */ |
| 88 | 88 | public function store(ClientRequest $request) |
| 89 | 89 | { |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | * |
| 144 | 144 | * @param int $id |
| 145 | 145 | * |
| 146 | - * @return Response |
|
| 146 | + * @return \Illuminate\Http\RedirectResponse |
|
| 147 | 147 | */ |
| 148 | 148 | public function update($id, ClientRequest $request) |
| 149 | 149 | { |
@@ -156,7 +156,6 @@ discard block |
||
| 156 | 156 | /** |
| 157 | 157 | * Remove the specified resource from storage. |
| 158 | 158 | * |
| 159 | - * @param int $id |
|
| 160 | 159 | * |
| 161 | 160 | * @return Response |
| 162 | 161 | */ |
@@ -54,25 +54,25 @@ discard block |
||
| 54 | 54 | public function GetTax() |
| 55 | 55 | { |
| 56 | 56 | return \Datatable::collection($this->tax->select('id', 'name', 'level', 'country', 'state', 'rate')->get()) |
| 57 | - ->addColumn('#', function ($model) { |
|
| 58 | - return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
|
| 57 | + ->addColumn('#', function($model) { |
|
| 58 | + return "<input type='checkbox' value=" . $model->id . ' name=select[] id=check>'; |
|
| 59 | 59 | }) |
| 60 | 60 | ->showColumns('name', 'level') |
| 61 | - ->addColumn('country', function ($model) { |
|
| 61 | + ->addColumn('country', function($model) { |
|
| 62 | 62 | if ($this->country->where('id', $model->country)->first()) { |
| 63 | 63 | return $this->country->where('id', $model->country)->first()->name; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | }) |
| 67 | - ->addColumn('state', function ($model) { |
|
| 67 | + ->addColumn('state', function($model) { |
|
| 68 | 68 | if ($this->state->where('id', $model->state)->first()) { |
| 69 | 69 | return $this->state->where('id', $model->state)->first()->name; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | }) |
| 73 | 73 | ->showColumns('rate') |
| 74 | - ->addColumn('action', function ($model) { |
|
| 75 | - return '<a href='.url('tax/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 74 | + ->addColumn('action', function($model) { |
|
| 75 | + return '<a href=' . url('tax/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 76 | 76 | }) |
| 77 | 77 | ->searchColumns('name') |
| 78 | 78 | ->orderColumns('name') |
@@ -173,34 +173,34 @@ discard block |
||
| 173 | 173 | } else { |
| 174 | 174 | echo "<div class='alert alert-danger alert-dismissable'> |
| 175 | 175 | <i class='fa fa-ban'></i> |
| 176 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 176 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 177 | 177 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 178 | - '.\Lang::get('message.no-record').' |
|
| 178 | + '.\Lang::get('message.no-record') . ' |
|
| 179 | 179 | </div>'; |
| 180 | 180 | //echo \Lang::get('message.no-record') . ' [id=>' . $id . ']'; |
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | echo "<div class='alert alert-success alert-dismissable'> |
| 184 | 184 | <i class='fa fa-ban'></i> |
| 185 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.success').' |
|
| 185 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.success') . ' |
|
| 186 | 186 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 187 | - '.\Lang::get('message.deleted-successfully').' |
|
| 187 | + '.\Lang::get('message.deleted-successfully') . ' |
|
| 188 | 188 | </div>'; |
| 189 | 189 | } else { |
| 190 | 190 | echo "<div class='alert alert-danger alert-dismissable'> |
| 191 | 191 | <i class='fa fa-ban'></i> |
| 192 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 192 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 193 | 193 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 194 | - '.\Lang::get('message.select-a-row').' |
|
| 194 | + '.\Lang::get('message.select-a-row') . ' |
|
| 195 | 195 | </div>'; |
| 196 | 196 | //echo \Lang::get('message.select-a-row'); |
| 197 | 197 | } |
| 198 | 198 | } catch (\Exception $e) { |
| 199 | 199 | echo "<div class='alert alert-danger alert-dismissable'> |
| 200 | 200 | <i class='fa fa-ban'></i> |
| 201 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 201 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 202 | 202 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 203 | - '.$e->getMessage().' |
|
| 203 | + '.$e->getMessage() . ' |
|
| 204 | 204 | </div>'; |
| 205 | 205 | } |
| 206 | 206 | } |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | $states = \App\Model\Common\State::where('country_id', $id)->get(); |
| 230 | 230 | //dd($states); |
| 231 | 231 | foreach ($states as $state) { |
| 232 | - echo '<option value='.$state->id.'>'.$state->name.'</option>'; |
|
| 232 | + echo '<option value=' . $state->id . '>' . $state->name . '</option>'; |
|
| 233 | 233 | } |
| 234 | 234 | } catch (\Exception $ex) { |
| 235 | 235 | echo "<option value=''>Problem while loading</option>"; |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | /** |
| 84 | 84 | * Store a newly created resource in storage. |
| 85 | 85 | * |
| 86 | - * @return Response |
|
| 86 | + * @return \Illuminate\Http\RedirectResponse |
|
| 87 | 87 | */ |
| 88 | 88 | public function store(ClientRequest $request) |
| 89 | 89 | { |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | * |
| 144 | 144 | * @param int $id |
| 145 | 145 | * |
| 146 | - * @return Response |
|
| 146 | + * @return \Illuminate\Http\RedirectResponse |
|
| 147 | 147 | */ |
| 148 | 148 | public function update($id, ClientRequest $request) |
| 149 | 149 | { |
@@ -156,7 +156,6 @@ discard block |
||
| 156 | 156 | /** |
| 157 | 157 | * Remove the specified resource from storage. |
| 158 | 158 | * |
| 159 | - * @param int $id |
|
| 160 | 159 | * |
| 161 | 160 | * @return Response |
| 162 | 161 | */ |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | if ($request->hasFile('profile_pic')) { |
| 26 | 26 | $name = \Input::file('profile_pic')->getClientOriginalName(); |
| 27 | 27 | $destinationPath = 'dist/app/users'; |
| 28 | - $fileName = rand(0000, 9999).'.'.$name; |
|
| 28 | + $fileName = rand(0000, 9999) . '.' . $name; |
|
| 29 | 29 | \Input::file('profile_pic')->move($destinationPath, $fileName); |
| 30 | 30 | $user->profile_pic = $fileName; |
| 31 | 31 | } |
@@ -47,25 +47,25 @@ |
||
| 47 | 47 | //dd($this->invoice->get()); |
| 48 | 48 | return \Datatable::collection($this->subscription->get()) |
| 49 | 49 | |
| 50 | - ->addColumn('user_id', function ($model) { |
|
| 50 | + ->addColumn('user_id', function($model) { |
|
| 51 | 51 | $first = $this->user->where('id', $model->user_id)->first()->first_name; |
| 52 | 52 | $last = $this->user->where('id', $model->user_id)->first()->last_name; |
| 53 | 53 | |
| 54 | - return ucfirst($first).' '.ucfirst($last); |
|
| 54 | + return ucfirst($first) . ' ' . ucfirst($last); |
|
| 55 | 55 | }) |
| 56 | - ->addColumn('plan_id', function ($model) { |
|
| 56 | + ->addColumn('plan_id', function($model) { |
|
| 57 | 57 | $name = $this->plan->where('id', $model->plan_id)->first()->name; |
| 58 | 58 | |
| 59 | 59 | return $name; |
| 60 | 60 | }) |
| 61 | - ->addColumn('order_id', function ($model) { |
|
| 61 | + ->addColumn('order_id', function($model) { |
|
| 62 | 62 | $name = $this->order->where('id', $model->order_id)->first()->id; |
| 63 | 63 | |
| 64 | 64 | return $name; |
| 65 | 65 | }) |
| 66 | 66 | ->showColumns('ends_at') |
| 67 | - ->addColumn('action', function ($model) { |
|
| 68 | - return '<a href='.url('invoices/'.$model->id)." class='btn btn-sm btn-primary'>View</a>"; |
|
| 67 | + ->addColumn('action', function($model) { |
|
| 68 | + return '<a href=' . url('invoices/' . $model->id) . " class='btn btn-sm btn-primary'>View</a>"; |
|
| 69 | 69 | }) |
| 70 | 70 | ->searchColumns('ends_at') |
| 71 | 71 | ->orderColumns('ends_at') |
@@ -60,30 +60,30 @@ |
||
| 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) { |
|
| 86 | - return '<a href='.url('slas/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 85 | + ->addColumn('action', function($model) { |
|
| 86 | + return '<a href=' . url('slas/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 87 | 87 | }) |
| 88 | 88 | ->searchColumns('name') |
| 89 | 89 | ->orderColumns('name') |
@@ -32,8 +32,8 @@ |
||
| 32 | 32 | { |
| 33 | 33 | return \Datatable::collection($this->service->get()) |
| 34 | 34 | ->showColumns('name') |
| 35 | - ->addColumn('action', function ($model) { |
|
| 36 | - return '<a href='.url('services/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 35 | + ->addColumn('action', function($model) { |
|
| 36 | + return '<a href=' . url('services/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 37 | 37 | }) |
| 38 | 38 | ->searchColumns('name') |
| 39 | 39 | ->orderColumns('name') |
@@ -37,8 +37,8 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | return \Datatable::collection($this->licence->get()) |
| 39 | 39 | ->showColumns('name', 'description', 'number_of_sla', 'price') |
| 40 | - ->addColumn('action', function ($model) { |
|
| 41 | - return '<a href='.url('licences/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 40 | + ->addColumn('action', function($model) { |
|
| 41 | + return '<a href=' . url('licences/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 42 | 42 | }) |
| 43 | 43 | ->searchColumns('description') |
| 44 | 44 | ->orderColumns('description') |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $productController = new \App\Http\Controllers\Product\ProductController(); |
| 52 | 52 | $url = $productController->GetMyUrl(); |
| 53 | 53 | $i = $this->licence->orderBy('created_at', 'desc')->first()->id + 1; |
| 54 | - $cartUrl = $url.'/cart?id='.$i; |
|
| 54 | + $cartUrl = $url . '/cart?id=' . $i; |
|
| 55 | 55 | |
| 56 | 56 | return view('themes.default1.licence.create', compact('cartUrl')); |
| 57 | 57 | } catch (\Exception $ex) { |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | $user->fill($request->except('password'))->save(); |
| 118 | 118 | $token = str_random(40); |
| 119 | 119 | $activate->create(['email' => $user->email, 'token' => $token]); |
| 120 | - \Mail::send('emails.welcome', ['token' => $token, 'email' => $user->email, 'pass' => $pass], function ($message) use ($user) { |
|
| 120 | + \Mail::send('emails.welcome', ['token' => $token, 'email' => $user->email, 'pass' => $pass], function($message) use ($user) { |
|
| 121 | 121 | $message->to($user->email, $user->first_name)->subject('Welcome!'); |
| 122 | 122 | }); |
| 123 | 123 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | * Handle a registration request for the application. |
| 38 | 38 | * |
| 39 | 39 | * @param \Illuminate\Http\Request $request |
| 40 | - * @return \Illuminate\Http\Response |
|
| 40 | + * @return \Illuminate\Http\RedirectResponse |
|
| 41 | 41 | */ |
| 42 | 42 | public function postRegister(Request $request) |
| 43 | 43 | { |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * Handle a registration request for the application. |
| 49 | 49 | * |
| 50 | 50 | * @param \Illuminate\Http\Request $request |
| 51 | - * @return \Illuminate\Http\Response |
|
| 51 | + * @return \Illuminate\Http\RedirectResponse |
|
| 52 | 52 | */ |
| 53 | 53 | public function register(Request $request) |
| 54 | 54 | { |