| @@ -50,7 +50,7 @@ | ||
| 50 | 50 | */ | 
| 51 | 51 | public function startsWith($letter) | 
| 52 | 52 |      { | 
| 53 | -        return array_filter($this->items, function ($item) use ($letter) { | |
| 53 | +        return array_filter($this->items, function($item) use ($letter) { | |
| 54 | 54 | return stripos($item, $letter) === 0; | 
| 55 | 55 | }); | 
| 56 | 56 | } | 
| @@ -13,7 +13,7 @@ | ||
| 13 | 13 | 'user_id', 'plan_id', 'order_id', 'deny_after_subscription', 'version', 'product_id', ]; | 
| 14 | 14 | protected $dates = ['ends_at']; | 
| 15 | 15 | protected static $logName = 'Subscription'; | 
| 16 | - protected static $logAttributes = ['ends_at', 'user_id', 'plan_id', 'order_id', 'version', 'product_id']; | |
| 16 | + protected static $logAttributes = ['ends_at', 'user_id', 'plan_id', 'order_id', 'version', 'product_id']; | |
| 17 | 17 | protected static $logOnlyDirty = true; | 
| 18 | 18 | |
| 19 | 19 | public function getDescriptionForEvent(string $eventName): string | 
| @@ -115,7 +115,7 @@ | ||
| 115 | 115 | <br>OTP has been sent to '.$number.'.<br>Please enter the | 
| 116 | 116 | OTP received on your mobile No below. Incase you did not recieve OTP, | 
| 117 | 117 | please get in touch with us on <a href="mailto:[email protected]"> | 
| 118 | - [email protected]</a>', ]; | |
| 118 | + [email protected]</a>',]; | |
| 119 | 119 | |
| 120 | 120 | return response()->json($response); | 
| 121 | 121 |          } catch (\Exception $ex) { | 
| @@ -59,17 +59,17 @@ discard block | ||
| 59 | 59 |          $new_promotion = $this->promotion->select('code', 'type', 'id')->get(); | 
| 60 | 60 | |
| 61 | 61 | return\ DataTables::of($new_promotion) | 
| 62 | -                            ->addColumn('checkbox', function ($model) { | |
| 62 | +                            ->addColumn('checkbox', function($model) { | |
| 63 | 63 | return "<input type='checkbox' class='promotion_checkbox' | 
| 64 | 64 | value=".$model->id.' name=select[] id=check>'; | 
| 65 | 65 | }) | 
| 66 | -                        ->addColumn('code', function ($model) { | |
| 66 | +                        ->addColumn('code', function($model) { | |
| 67 | 67 | return ucfirst($model->code); | 
| 68 | 68 | }) | 
| 69 | -                        ->addColumn('type', function ($model) { | |
| 69 | +                        ->addColumn('type', function($model) { | |
| 70 | 70 |                              return $this->type->where('id', $model->type)->first()->name; | 
| 71 | 71 | }) | 
| 72 | -                        ->addColumn('products', function ($model) { | |
| 72 | +                        ->addColumn('products', function($model) { | |
| 73 | 73 |                              $selected = $this->promoRelation->select('product_id') | 
| 74 | 74 |                              ->where('promotion_id', $model->id)->get(); | 
| 75 | 75 | $result = []; | 
| @@ -82,7 +82,7 @@ discard block | ||
| 82 | 82 | return 'None'; | 
| 83 | 83 | } | 
| 84 | 84 | }) | 
| 85 | -                        ->addColumn('action', function ($model) { | |
| 85 | +                        ->addColumn('action', function($model) { | |
| 86 | 86 |                              return '<a href='.url('promotions/'.$model->id.'/edit') | 
| 87 | 87 | ." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' | 
| 88 | 88 | style='color:white;'> </i>  Edit</a>"; | 
| @@ -70,37 +70,37 @@ 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' | 
| 75 | 75 | value=".$model->id.' name=select[] id=check>'; | 
| 76 | 76 | }) | 
| 77 | -                            ->addColumn('tax_classes_id', function ($model) { | |
| 77 | +                            ->addColumn('tax_classes_id', function($model) { | |
| 78 | 78 |                                  return ucfirst($this->tax_class->where('id', $model->tax_classes_id)->first()->name); | 
| 79 | 79 | }) | 
| 80 | -                            ->addColumn('name', function ($model) { | |
| 80 | +                            ->addColumn('name', function($model) { | |
| 81 | 81 | return ucfirst($model->name); | 
| 82 | 82 | }) | 
| 83 | 83 | |
| 84 | 84 |                              // ->showColumns('name', 'level') | 
| 85 | -                            ->addColumn('country', function ($model) { | |
| 85 | +                            ->addColumn('country', function($model) { | |
| 86 | 86 |                                  if ($this->country->where('country_code_char2', $model->country)->first()) { | 
| 87 | 87 | return ucfirst($this->country | 
| 88 | 88 |                                        ->where('country_code_char2', $model->country)->first()->country_name); | 
| 89 | 89 | } | 
| 90 | 90 | }) | 
| 91 | -                            ->addColumn('state', function ($model) { | |
| 91 | +                            ->addColumn('state', function($model) { | |
| 92 | 92 |                                  if ($this->state->where('state_subdivision_code', $model->state)->first()) { | 
| 93 | 93 | return $this->state | 
| 94 | 94 |                                      ->where('state_subdivision_code', $model->state) | 
| 95 | 95 | ->first()->state_subdivision_name; | 
| 96 | 96 | } | 
| 97 | 97 | }) | 
| 98 | -                            ->addColumn('rate', function ($model) { | |
| 98 | +                            ->addColumn('rate', function($model) { | |
| 99 | 99 | return $model->rate; | 
| 100 | 100 | }) | 
| 101 | 101 | |
| 102 | 102 |                              // ->showColumns('rate') | 
| 103 | -                            ->addColumn('action', function ($model) { | |
| 103 | +                            ->addColumn('action', function($model) { | |
| 104 | 104 |                                  return '<a href='.url('tax/'.$model->id.'/edit'). | 
| 105 | 105 | " class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' | 
| 106 | 106 | style='color:white;'> </i>  Edit</a>"; | 
| @@ -112,26 +112,26 @@ discard block | ||
| 112 | 112 | public function getTaxTable() | 
| 113 | 113 |      { | 
| 114 | 114 |          return \DataTables::of(TaxByState::select('id', 'state', 'c_gst', 's_gst', 'i_gst', 'ut_gst')->get()) | 
| 115 | -                         ->addColumn('id', function ($model) { | |
| 115 | +                         ->addColumn('id', function($model) { | |
| 116 | 116 | return $model->id; | 
| 117 | 117 | }) | 
| 118 | 118 | |
| 119 | -                         ->addColumn('state', function ($model) { | |
| 119 | +                         ->addColumn('state', function($model) { | |
| 120 | 120 | return ucfirst($model->state); | 
| 121 | 121 | }) | 
| 122 | -                         ->addColumn('c_gst', function ($model) { | |
| 122 | +                         ->addColumn('c_gst', function($model) { | |
| 123 | 123 | return ucfirst($model->c_gst); | 
| 124 | 124 | }) | 
| 125 | -                         ->addColumn('s_gst', function ($model) { | |
| 125 | +                         ->addColumn('s_gst', function($model) { | |
| 126 | 126 | return ucfirst($model->s_gst); | 
| 127 | 127 | }) | 
| 128 | -                         ->addColumn('i_gst', function ($model) { | |
| 128 | +                         ->addColumn('i_gst', function($model) { | |
| 129 | 129 | return ucfirst($model->i_gst); | 
| 130 | 130 | }) | 
| 131 | -                         ->addColumn('ut_gst', function ($model) { | |
| 131 | +                         ->addColumn('ut_gst', function($model) { | |
| 132 | 132 | return ucfirst($model->ut_gst); | 
| 133 | 133 | }) | 
| 134 | - ->rawColumns(['id', 'state', 'c_gst', 's_gst', 'i_gst', 'ut_gst']) | |
| 134 | + ->rawColumns(['id', 'state', 'c_gst', 's_gst', 'i_gst', 'ut_gst']) | |
| 135 | 135 | ->make(true); | 
| 136 | 136 | } | 
| 137 | 137 | |
| @@ -47,7 +47,7 @@ discard block | ||
| 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 | $user = $model->user()->first(); | 
| 52 | 52 | $first = $user->first_name; | 
| 53 | 53 | $last = $user->last_name; | 
| @@ -55,18 +55,18 @@ discard block | ||
| 55 | 55 | |
| 56 | 56 |                              return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>'; | 
| 57 | 57 | }) | 
| 58 | -                        ->addColumn('plan_id', function ($model) { | |
| 58 | +                        ->addColumn('plan_id', function($model) { | |
| 59 | 59 |                              $name = $this->plan->where('id', $model->plan_id)->first()->name; | 
| 60 | 60 | |
| 61 | 61 | return $name; | 
| 62 | 62 | }) | 
| 63 | -                        ->addColumn('order_id', function ($model) { | |
| 63 | +                        ->addColumn('order_id', function($model) { | |
| 64 | 64 |                              $name = $this->order->where('id', $model->order_id)->first()->id; | 
| 65 | 65 | |
| 66 | 66 | return $name; | 
| 67 | 67 | }) | 
| 68 | 68 |                          ->showColumns('ends_at') | 
| 69 | -                        ->addColumn('action', function ($model) { | |
| 69 | +                        ->addColumn('action', function($model) { | |
| 70 | 70 |                              return '<a href='.url('subscriptions/'.$model->id)."  | 
| 71 | 71 | class='btn btn-sm btn-primary'>View</a>"; | 
| 72 | 72 | }) | 
| @@ -48,11 +48,11 @@ discard block | ||
| 48 | 48 |      { | 
| 49 | 49 |          return \Datatable::collection($this->bundle->select('id', 'name', | 
| 50 | 50 | 'valid_from', 'valid_till', 'uses', 'maximum_uses')->get()) | 
| 51 | -                        ->addColumn('#', function ($model) { | |
| 51 | +                        ->addColumn('#', function($model) { | |
| 52 | 52 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; | 
| 53 | 53 | }) | 
| 54 | 54 |                          ->showColumns('name', 'valid_from', 'valid_till', 'uses', 'maximum_uses') | 
| 55 | -                        ->addColumn('item', function ($model) { | |
| 55 | +                        ->addColumn('item', function($model) { | |
| 56 | 56 |                              $name = $this->relation->where('bundle_id', $model->id)->pluck('product_id'); | 
| 57 | 57 | //dd($name); | 
| 58 | 58 | $result = []; | 
| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | //dd($result); | 
| 63 | 63 |                              return implode(',', $result); | 
| 64 | 64 | }) | 
| 65 | -                        ->addColumn('action', function ($model) { | |
| 65 | +                        ->addColumn('action', function($model) { | |
| 66 | 66 |                              return '<a href='.url('bundles/'.$model->id.'/edit'). | 
| 67 | 67 | " class='btn btn-sm btn-primary'>Edit</a>"; | 
| 68 | 68 | }) | 
| @@ -52,11 +52,11 @@ discard block | ||
| 52 | 52 | |
| 53 | 53 |          // return \Datatable::of($this->group->select('id', 'name')->get()) | 
| 54 | 54 | |
| 55 | -                        ->editColumn('#', function ($model) { | |
| 55 | +                        ->editColumn('#', function($model) { | |
| 56 | 56 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; | 
| 57 | 57 | }) | 
| 58 | 58 |                          // ->showColumns('name') | 
| 59 | -                        ->editColumn('features', function ($model) { | |
| 59 | +                        ->editColumn('features', function($model) { | |
| 60 | 60 |                              $features = $this->feature->select('features')->where('group_id', $model->id)->get(); | 
| 61 | 61 | //dd($features); | 
| 62 | 62 | $result = []; | 
| @@ -67,7 +67,7 @@ discard block | ||
| 67 | 67 | //dd($result); | 
| 68 | 68 |                              return implode(',', $result); | 
| 69 | 69 | }) | 
| 70 | -                        ->addColumn('action', function ($model) { | |
| 70 | +                        ->addColumn('action', function($model) { | |
| 71 | 71 |                              return '<a href='.url('groups/'.$model->id.'/edit'). | 
| 72 | 72 | " class='btn btn-sm btn-primary'>Edit</a>"; | 
| 73 | 73 | }) | 
| @@ -35,14 +35,14 @@ | ||
| 35 | 35 | public function getServices() | 
| 36 | 36 |      { | 
| 37 | 37 | return \Datatable::collection($this->service->get()) | 
| 38 | -                        ->addColumn('#', function ($model) { | |
| 38 | +                        ->addColumn('#', function($model) { | |
| 39 | 39 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; | 
| 40 | 40 | }) | 
| 41 | 41 |                          ->showColumns('name') | 
| 42 | -                        ->addColumn('plan', function ($model) { | |
| 42 | +                        ->addColumn('plan', function($model) { | |
| 43 | 43 | //return $this->product->plan()->name; | 
| 44 | 44 | }) | 
| 45 | -                        ->addColumn('action', function ($model) { | |
| 45 | +                        ->addColumn('action', function($model) { | |
| 46 | 46 |                              return '<a href='.url('products/'.$model->id.'/edit') | 
| 47 | 47 | ." class='btn btn-sm btn-primary'>Edit</a>"; | 
| 48 | 48 | }) |