@@ -11,13 +11,11 @@ |
||
| 11 | 11 | use App\Model\Order\InvoiceItem; |
| 12 | 12 | use App\Model\Order\Order; |
| 13 | 13 | use App\Model\Payment\Plan; |
| 14 | -use App\Model\Product\Addon; |
|
| 15 | 14 | use App\Model\Product\Price; |
| 16 | 15 | use App\Model\Product\Product; |
| 17 | 16 | use App\Model\Product\Subscription; |
| 18 | 17 | use App\User; |
| 19 | 18 | use Cart; |
| 20 | -use Illuminate\Http\Request; |
|
| 21 | 19 | |
| 22 | 20 | class CheckoutController extends Controller |
| 23 | 21 | { |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | $from = $settings->email; |
| 113 | 113 | $to = $this->user->email; |
| 114 | 114 | $data = $this->template->where('id', $settings->where('id', 1)->first()->welcome_mail)->first()->data; |
| 115 | - $replace = ['name' => $this->user->first_name.' '.$this->user->last_name, 'username' => $this->user->email, 'password' => $str]; |
|
| 115 | + $replace = ['name' => $this->user->first_name . ' ' . $this->user->last_name, 'username' => $this->user->email, 'password' => $str]; |
|
| 116 | 116 | $this->templateController->Mailing($from, $to, $data, 'Welcome Email', $replace); |
| 117 | 117 | |
| 118 | 118 | \Auth::login($this->user); |
@@ -148,7 +148,6 @@ discard block |
||
| 148 | 148 | /** |
| 149 | 149 | * Remove the specified resource from storage. |
| 150 | 150 | * |
| 151 | - * @param int $id |
|
| 152 | 151 | * |
| 153 | 152 | * @return Response |
| 154 | 153 | */ |
@@ -209,6 +208,9 @@ discard block |
||
| 209 | 208 | } |
| 210 | 209 | } |
| 211 | 210 | |
| 211 | + /** |
|
| 212 | + * @param FrontendPage $model |
|
| 213 | + */ |
|
| 212 | 214 | public function Result($search, $model) |
| 213 | 215 | { |
| 214 | 216 | try { |
@@ -31,15 +31,15 @@ discard block |
||
| 31 | 31 | public function GetPages() |
| 32 | 32 | { |
| 33 | 33 | return \Datatable::collection($this->page->get()) |
| 34 | - ->addColumn('#', function ($model) { |
|
| 35 | - return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
|
| 34 | + ->addColumn('#', function($model) { |
|
| 35 | + return "<input type='checkbox' value=" . $model->id . ' name=select[] id=check>'; |
|
| 36 | 36 | }) |
| 37 | 37 | ->showColumns('name', 'url', 'created_at') |
| 38 | - ->addColumn('content', function ($model) { |
|
| 38 | + ->addColumn('content', function($model) { |
|
| 39 | 39 | return str_limit($model->content, 10, '...'); |
| 40 | 40 | }) |
| 41 | - ->addColumn('action', function ($model) { |
|
| 42 | - return '<a href='.url('pages/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 41 | + ->addColumn('action', function($model) { |
|
| 42 | + return '<a href=' . url('pages/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 43 | 43 | }) |
| 44 | 44 | ->searchColumns('name', 'content') |
| 45 | 45 | ->orderColumns('name') |
@@ -97,10 +97,10 @@ discard block |
||
| 97 | 97 | $productController = new \App\Http\Controllers\Product\ProductController(); |
| 98 | 98 | $url = $productController->GetMyUrl(); |
| 99 | 99 | $segment = $this->Addsegment(['public']); |
| 100 | - $url = $url.$segment; |
|
| 100 | + $url = $url . $segment; |
|
| 101 | 101 | |
| 102 | 102 | $slug = str_slug($slug, '-'); |
| 103 | - echo $url.'/'.$slug; |
|
| 103 | + echo $url . '/' . $slug; |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | public function GetSlug($slug) |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | { |
| 114 | 114 | $segment = ''; |
| 115 | 115 | foreach ($segments as $seg) { |
| 116 | - $segment .= '/'.$seg; |
|
| 116 | + $segment .= '/' . $seg; |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | return $segment; |
@@ -165,34 +165,34 @@ discard block |
||
| 165 | 165 | } else { |
| 166 | 166 | echo "<div class='alert alert-danger alert-dismissable'> |
| 167 | 167 | <i class='fa fa-ban'></i> |
| 168 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 168 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 169 | 169 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 170 | - '.\Lang::get('message.no-record').' |
|
| 170 | + '.\Lang::get('message.no-record') . ' |
|
| 171 | 171 | </div>'; |
| 172 | 172 | //echo \Lang::get('message.no-record') . ' [id=>' . $id . ']'; |
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | echo "<div class='alert alert-success alert-dismissable'> |
| 176 | 176 | <i class='fa fa-ban'></i> |
| 177 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.success').' |
|
| 177 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.success') . ' |
|
| 178 | 178 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 179 | - '.\Lang::get('message.deleted-successfully').' |
|
| 179 | + '.\Lang::get('message.deleted-successfully') . ' |
|
| 180 | 180 | </div>'; |
| 181 | 181 | } else { |
| 182 | 182 | echo "<div class='alert alert-danger alert-dismissable'> |
| 183 | 183 | <i class='fa fa-ban'></i> |
| 184 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 184 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 185 | 185 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 186 | - '.\Lang::get('message.select-a-row').' |
|
| 186 | + '.\Lang::get('message.select-a-row') . ' |
|
| 187 | 187 | </div>'; |
| 188 | 188 | //echo \Lang::get('message.select-a-row'); |
| 189 | 189 | } |
| 190 | 190 | } catch (\Exception $e) { |
| 191 | 191 | echo "<div class='alert alert-danger alert-dismissable'> |
| 192 | 192 | <i class='fa fa-ban'></i> |
| 193 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 193 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 194 | 194 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 195 | - '.$e->getMessage().' |
|
| 195 | + '.$e->getMessage() . ' |
|
| 196 | 196 | </div>'; |
| 197 | 197 | } |
| 198 | 198 | } |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | public function Result($search, $model) |
| 213 | 213 | { |
| 214 | 214 | try { |
| 215 | - $model = $model->where('name', 'like', '%'.$search.'%')->orWhere('content', 'like', '%'.$search.'%')->paginate(10); |
|
| 215 | + $model = $model->where('name', 'like', '%' . $search . '%')->orWhere('content', 'like', '%' . $search . '%')->paginate(10); |
|
| 216 | 216 | |
| 217 | 217 | return $model->setPath('search'); |
| 218 | 218 | } catch (\Exception $ex) { |
@@ -92,7 +92,6 @@ |
||
| 92 | 92 | /** |
| 93 | 93 | * Remove the specified resource from storage. |
| 94 | 94 | * |
| 95 | - * @param int $id |
|
| 96 | 95 | * |
| 97 | 96 | * @return Response |
| 98 | 97 | */ |
@@ -31,15 +31,15 @@ discard block |
||
| 31 | 31 | public function GetPages() |
| 32 | 32 | { |
| 33 | 33 | return \Datatable::collection($this->widget->get()) |
| 34 | - ->addColumn('#', function ($model) { |
|
| 35 | - return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
|
| 34 | + ->addColumn('#', function($model) { |
|
| 35 | + return "<input type='checkbox' value=" . $model->id . ' name=select[] id=check>'; |
|
| 36 | 36 | }) |
| 37 | 37 | ->showColumns('name', 'type', 'created_at') |
| 38 | - ->addColumn('content', function ($model) { |
|
| 38 | + ->addColumn('content', function($model) { |
|
| 39 | 39 | return str_limit($model->content, 10, '...'); |
| 40 | 40 | }) |
| 41 | - ->addColumn('action', function ($model) { |
|
| 42 | - return '<a href='.url('pages/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 41 | + ->addColumn('action', function($model) { |
|
| 42 | + return '<a href=' . url('pages/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 43 | 43 | }) |
| 44 | 44 | ->searchColumns('name', 'content') |
| 45 | 45 | ->orderColumns('name') |
@@ -109,34 +109,34 @@ discard block |
||
| 109 | 109 | } else { |
| 110 | 110 | echo "<div class='alert alert-danger alert-dismissable'> |
| 111 | 111 | <i class='fa fa-ban'></i> |
| 112 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 112 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 113 | 113 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 114 | - '.\Lang::get('message.no-record').' |
|
| 114 | + '.\Lang::get('message.no-record') . ' |
|
| 115 | 115 | </div>'; |
| 116 | 116 | //echo \Lang::get('message.no-record') . ' [id=>' . $id . ']'; |
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | 119 | echo "<div class='alert alert-success alert-dismissable'> |
| 120 | 120 | <i class='fa fa-ban'></i> |
| 121 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.success').' |
|
| 121 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.success') . ' |
|
| 122 | 122 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 123 | - '.\Lang::get('message.deleted-successfully').' |
|
| 123 | + '.\Lang::get('message.deleted-successfully') . ' |
|
| 124 | 124 | </div>'; |
| 125 | 125 | } else { |
| 126 | 126 | echo "<div class='alert alert-danger alert-dismissable'> |
| 127 | 127 | <i class='fa fa-ban'></i> |
| 128 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 128 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 129 | 129 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 130 | - '.\Lang::get('message.select-a-row').' |
|
| 130 | + '.\Lang::get('message.select-a-row') . ' |
|
| 131 | 131 | </div>'; |
| 132 | 132 | //echo \Lang::get('message.select-a-row'); |
| 133 | 133 | } |
| 134 | 134 | } catch (\Exception $e) { |
| 135 | 135 | echo "<div class='alert alert-danger alert-dismissable'> |
| 136 | 136 | <i class='fa fa-ban'></i> |
| 137 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 137 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 138 | 138 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 139 | - '.$e->getMessage().' |
|
| 139 | + '.$e->getMessage() . ' |
|
| 140 | 140 | </div>'; |
| 141 | 141 | } |
| 142 | 142 | } |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use App\Http\Controllers\Controller; |
| 6 | 6 | use App\Model\Licence\LicencedOrganization; |
| 7 | 7 | use App\Organization; |
| 8 | -use Illuminate\Http\Request; |
|
| 9 | 8 | |
| 10 | 9 | class LicenceOrderController extends Controller |
| 11 | 10 | { |
@@ -36,14 +36,14 @@ |
||
| 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 | - return '<a href='.url('organization/'.$org->id).'>'.ucfirst($org->name).'</a>'; |
|
| 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) { |
|
| 46 | - return '<a href='.url('licence-orders/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 45 | + ->addColumn('action', function($model) { |
|
| 46 | + return '<a href=' . url('licence-orders/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 47 | 47 | }) |
| 48 | 48 | |
| 49 | 49 | ->searchColumns('licence_name') |
@@ -10,7 +10,6 @@ |
||
| 10 | 10 | use App\Model\Order\Payment; |
| 11 | 11 | use App\User; |
| 12 | 12 | use Illuminate\Http\Request; |
| 13 | -use Input; |
|
| 14 | 13 | |
| 15 | 14 | class InvoiceController extends Controller |
| 16 | 15 | { |
@@ -59,16 +59,16 @@ discard block |
||
| 59 | 59 | { |
| 60 | 60 | //dd($this->invoice->get()); |
| 61 | 61 | return \Datatable::collection($this->invoice->get()) |
| 62 | - ->addColumn('client', function ($model) { |
|
| 62 | + ->addColumn('client', function($model) { |
|
| 63 | 63 | $first = $this->user->where('id', $model->user_id)->first()->first_name; |
| 64 | 64 | $last = $this->user->where('id', $model->user_id)->first()->last_name; |
| 65 | 65 | $id = $this->user->where('id', $model->user_id)->first()->id; |
| 66 | 66 | |
| 67 | - return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>'; |
|
| 67 | + return '<a href=' . url('clients/' . $id) . '>' . ucfirst($first) . ' ' . ucfirst($last) . '</a>'; |
|
| 68 | 68 | }) |
| 69 | 69 | ->showColumns('number', 'date', 'grand_total') |
| 70 | - ->addColumn('action', function ($model) { |
|
| 71 | - return '<a href='.url('invoices/'.$model->id)." class='btn btn-sm btn-primary'>View</a>"; |
|
| 70 | + ->addColumn('action', function($model) { |
|
| 71 | + return '<a href=' . url('invoices/' . $model->id) . " class='btn btn-sm btn-primary'>View</a>"; |
|
| 72 | 72 | }) |
| 73 | 73 | ->searchColumns('date') |
| 74 | 74 | ->orderColumns('date') |
@@ -176,8 +176,8 @@ discard block |
||
| 176 | 176 | |
| 177 | 177 | foreach ($cart->attributes['tax'] as $tax) { |
| 178 | 178 | //dd($tax['name']); |
| 179 | - $tax_name .= $tax['name'].','; |
|
| 180 | - $tax_percentage .= $tax['rate'].','; |
|
| 179 | + $tax_name .= $tax['name'] . ','; |
|
| 180 | + $tax_percentage .= $tax['rate'] . ','; |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | //dd($tax_name); |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | /** |
| 115 | 115 | * Store a newly created resource in storage. |
| 116 | 116 | * |
| 117 | - * @return Response |
|
| 117 | + * @return \Illuminate\Http\RedirectResponse |
|
| 118 | 118 | */ |
| 119 | 119 | public function store(OrderRequest $request) |
| 120 | 120 | { |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | * |
| 179 | 179 | * @param int $id |
| 180 | 180 | * |
| 181 | - * @return Response |
|
| 181 | + * @return \Illuminate\Http\RedirectResponse |
|
| 182 | 182 | */ |
| 183 | 183 | public function update($id, OrderRequest $request) |
| 184 | 184 | { |
@@ -195,7 +195,6 @@ discard block |
||
| 195 | 195 | /** |
| 196 | 196 | * Remove the specified resource from storage. |
| 197 | 197 | * |
| 198 | - * @param int $id |
|
| 199 | 198 | * |
| 200 | 199 | * @return Response |
| 201 | 200 | */ |
@@ -248,7 +247,7 @@ discard block |
||
| 248 | 247 | * |
| 249 | 248 | * @param Request $request |
| 250 | 249 | * |
| 251 | - * @return type |
|
| 250 | + * @return \Illuminate\Http\RedirectResponse |
|
| 252 | 251 | */ |
| 253 | 252 | public function orderExecute(Request $request) |
| 254 | 253 | { |
@@ -385,7 +384,7 @@ discard block |
||
| 385 | 384 | * |
| 386 | 385 | * @throws \Exception |
| 387 | 386 | * |
| 388 | - * @return type |
|
| 387 | + * @return string|null |
|
| 389 | 388 | */ |
| 390 | 389 | public function checkProductForSerialKey($product_id) |
| 391 | 390 | { |
@@ -406,7 +405,7 @@ discard block |
||
| 406 | 405 | * |
| 407 | 406 | * @throws \Exception |
| 408 | 407 | * |
| 409 | - * @return type |
|
| 408 | + * @return string|null |
|
| 410 | 409 | */ |
| 411 | 410 | public function generateSerialKey($product_type) |
| 412 | 411 | { |
@@ -73,19 +73,19 @@ discard block |
||
| 73 | 73 | public function GetOrders() |
| 74 | 74 | { |
| 75 | 75 | return \Datatable::collection($this->order->get()) |
| 76 | - ->addColumn('#', function ($model) { |
|
| 77 | - return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
|
| 76 | + ->addColumn('#', function($model) { |
|
| 77 | + return "<input type='checkbox' value=" . $model->id . ' name=select[] id=check>'; |
|
| 78 | 78 | }) |
| 79 | 79 | ->showColumns('created_at') |
| 80 | - ->addColumn('client', function ($model) { |
|
| 80 | + ->addColumn('client', function($model) { |
|
| 81 | 81 | $first = $this->user->where('id', $model->client)->first()->first_name; |
| 82 | 82 | $last = $this->user->where('id', $model->client)->first()->last_name; |
| 83 | 83 | |
| 84 | - return ucfirst($first).' '.ucfirst($last); |
|
| 84 | + return ucfirst($first) . ' ' . ucfirst($last); |
|
| 85 | 85 | }) |
| 86 | 86 | ->showColumns('payment_method', 'price_override', 'order_status') |
| 87 | - ->addColumn('action', function ($model) { |
|
| 88 | - return '<a href='.url('orders/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 87 | + ->addColumn('action', function($model) { |
|
| 88 | + return '<a href=' . url('orders/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 89 | 89 | }) |
| 90 | 90 | ->searchColumns('name') |
| 91 | 91 | ->orderColumns('name') |
@@ -211,34 +211,34 @@ discard block |
||
| 211 | 211 | } else { |
| 212 | 212 | echo "<div class='alert alert-danger alert-dismissable'> |
| 213 | 213 | <i class='fa fa-ban'></i> |
| 214 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 214 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 215 | 215 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 216 | - '.\Lang::get('message.no-record').' |
|
| 216 | + '.\Lang::get('message.no-record') . ' |
|
| 217 | 217 | </div>'; |
| 218 | 218 | //echo \Lang::get('message.no-record') . ' [id=>' . $id . ']'; |
| 219 | 219 | } |
| 220 | 220 | } |
| 221 | 221 | echo "<div class='alert alert-success alert-dismissable'> |
| 222 | 222 | <i class='fa fa-ban'></i> |
| 223 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.success').' |
|
| 223 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.success') . ' |
|
| 224 | 224 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 225 | - '.\Lang::get('message.deleted-successfully').' |
|
| 225 | + '.\Lang::get('message.deleted-successfully') . ' |
|
| 226 | 226 | </div>'; |
| 227 | 227 | } else { |
| 228 | 228 | echo "<div class='alert alert-danger alert-dismissable'> |
| 229 | 229 | <i class='fa fa-ban'></i> |
| 230 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 230 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 231 | 231 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 232 | - '.\Lang::get('message.select-a-row').' |
|
| 232 | + '.\Lang::get('message.select-a-row') . ' |
|
| 233 | 233 | </div>'; |
| 234 | 234 | //echo \Lang::get('message.select-a-row'); |
| 235 | 235 | } |
| 236 | 236 | } catch (\Exception $e) { |
| 237 | 237 | echo "<div class='alert alert-danger alert-dismissable'> |
| 238 | 238 | <i class='fa fa-ban'></i> |
| 239 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 239 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 240 | 240 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 241 | - '.$e->getMessage().' |
|
| 241 | + '.$e->getMessage() . ' |
|
| 242 | 242 | </div>'; |
| 243 | 243 | } |
| 244 | 244 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | /** |
| 114 | 114 | * Store a newly created resource in storage. |
| 115 | 115 | * |
| 116 | - * @return Response |
|
| 116 | + * @return \Illuminate\Http\RedirectResponse |
|
| 117 | 117 | */ |
| 118 | 118 | public function store(Request $request) |
| 119 | 119 | { |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | * |
| 156 | 156 | * @param int $id |
| 157 | 157 | * |
| 158 | - * @return Response |
|
| 158 | + * @return \Illuminate\Http\RedirectResponse|null |
|
| 159 | 159 | */ |
| 160 | 160 | public function update($id, Request $request) |
| 161 | 161 | { |
@@ -171,7 +171,6 @@ discard block |
||
| 171 | 171 | /** |
| 172 | 172 | * Remove the specified resource from storage. |
| 173 | 173 | * |
| 174 | - * @param int $id |
|
| 175 | 174 | * |
| 176 | 175 | * @return Response |
| 177 | 176 | */ |
@@ -33,23 +33,23 @@ discard block |
||
| 33 | 33 | public function GetCurrency() |
| 34 | 34 | { |
| 35 | 35 | return \Datatable::collection($this->currency->select('name', 'id')->where('id', '!=', 1)->get()) |
| 36 | - ->addColumn('#', function ($model) { |
|
| 37 | - return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
|
| 36 | + ->addColumn('#', function($model) { |
|
| 37 | + return "<input type='checkbox' value=" . $model->id . ' name=select[] id=check>'; |
|
| 38 | 38 | }) |
| 39 | 39 | ->showColumns('name', 'base_conversion') |
| 40 | - ->addColumn('action', function ($model) { |
|
| 40 | + ->addColumn('action', function($model) { |
|
| 41 | 41 | //return "<a href=" . url('products/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a>"; |
| 42 | 42 | //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'; |
| 43 | 43 | |
| 44 | - return "<a href=#edit class='btn btn-primary' data-toggle='modal' data-target=#edit".$model->id.'>'.\Lang::get('message.edit')."</a> |
|
| 45 | - <div class='modal fade' id=edit".$model->id."> |
|
| 44 | + return "<a href=#edit class='btn btn-primary' data-toggle='modal' data-target=#edit" . $model->id . '>' . \Lang::get('message.edit') . "</a> |
|
| 45 | + <div class='modal fade' id=edit".$model->id . "> |
|
| 46 | 46 | <div class='modal-dialog'> |
| 47 | 47 | <div class='modal-content'> |
| 48 | 48 | <div class='modal-header'> |
| 49 | 49 | <button type='button' class='close' data-dismiss='modal' aria-label='Close'><span aria-hidden='true'>×</span></button> |
| 50 | 50 | <h4 class='modal-title'>Edit Currency</h4> |
| 51 | 51 | </div> |
| 52 | - ".Form::model($model, ['url' => 'currency/'.$model->id, 'method' => 'patch'])." |
|
| 52 | + ".Form::model($model, ['url' => 'currency/' . $model->id, 'method' => 'patch']) . " |
|
| 53 | 53 | <div class='modal-body'> |
| 54 | 54 | |
| 55 | 55 | |
@@ -58,23 +58,23 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | <div class='form-group'> |
| 60 | 60 | |
| 61 | - ".Form::label('name', Lang::get('message.name'), ['class' => 'required']).' |
|
| 62 | - '.Form::text('name', null, ['class' => 'form-control'])." |
|
| 61 | + ".Form::label('name', Lang::get('message.name'), ['class' => 'required']) . ' |
|
| 62 | + '.Form::text('name', null, ['class' => 'form-control']) . " |
|
| 63 | 63 | |
| 64 | 64 | </div> |
| 65 | 65 | <div class='form-group'> |
| 66 | - ".Form::label('code', Lang::get('message.code'), ['class' => 'required']).' |
|
| 67 | - '.Form::text('code', null, ['class' => 'form-control'])." |
|
| 66 | + ".Form::label('code', Lang::get('message.code'), ['class' => 'required']) . ' |
|
| 67 | + '.Form::text('code', null, ['class' => 'form-control']) . " |
|
| 68 | 68 | |
| 69 | 69 | </div> |
| 70 | 70 | <div class='form-group'> |
| 71 | - ".Form::label('symbol', Lang::get('message.symbol')).' |
|
| 72 | - '.Form::text('symbol', null, ['class' => 'form-control'])." |
|
| 71 | + ".Form::label('symbol', Lang::get('message.symbol')) . ' |
|
| 72 | + '.Form::text('symbol', null, ['class' => 'form-control']) . " |
|
| 73 | 73 | |
| 74 | 74 | </div> |
| 75 | 75 | <div class='form-group'> |
| 76 | - ".Form::label('base_conversion', Lang::get('message.base_conversion_rate'), ['class' => 'required']).' |
|
| 77 | - '.Form::text('base_conversion', null, ['class' => 'form-control'])." |
|
| 76 | + ".Form::label('base_conversion', Lang::get('message.base_conversion_rate'), ['class' => 'required']) . ' |
|
| 77 | + '.Form::text('base_conversion', null, ['class' => 'form-control']) . " |
|
| 78 | 78 | |
| 79 | 79 | </div> |
| 80 | 80 | |
@@ -82,11 +82,11 @@ discard block |
||
| 82 | 82 | </div> |
| 83 | 83 | <div class='modal-footer'> |
| 84 | 84 | <button type=button id=close class='btn btn-default pull-left' data-dismiss=modal>Close</button> |
| 85 | - <input type=submit class='btn btn-primary' value=".\Lang::get('message.save').'> |
|
| 85 | + <input type=submit class='btn btn-primary' value=".\Lang::get('message.save') . '> |
|
| 86 | 86 | |
| 87 | 87 | </div> |
| 88 | 88 | |
| 89 | - '.Form::close().' |
|
| 89 | + '.Form::close() . ' |
|
| 90 | 90 | |
| 91 | 91 | |
| 92 | 92 | |
@@ -188,42 +188,42 @@ discard block |
||
| 188 | 188 | } else { |
| 189 | 189 | echo "<div class='alert alert-danger alert-dismissable'> |
| 190 | 190 | <i class='fa fa-ban'></i> |
| 191 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 191 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 192 | 192 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 193 | - '.\Lang::get('message.no-record').' |
|
| 193 | + '.\Lang::get('message.no-record') . ' |
|
| 194 | 194 | </div>'; |
| 195 | 195 | //echo \Lang::get('message.no-record') . ' [id=>' . $id . ']'; |
| 196 | 196 | } |
| 197 | 197 | echo "<div class='alert alert-success alert-dismissable'> |
| 198 | 198 | <i class='fa fa-ban'></i> |
| 199 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.success').' |
|
| 199 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.success') . ' |
|
| 200 | 200 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 201 | - '.\Lang::get('message.deleted-successfully').' |
|
| 201 | + '.\Lang::get('message.deleted-successfully') . ' |
|
| 202 | 202 | </div>'; |
| 203 | 203 | } else { |
| 204 | 204 | echo "<div class='alert alert-danger alert-dismissable'> |
| 205 | 205 | <i class='fa fa-ban'></i> |
| 206 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 206 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 207 | 207 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 208 | - '.\Lang::get('message.can-not-delete-default').' |
|
| 208 | + '.\Lang::get('message.can-not-delete-default') . ' |
|
| 209 | 209 | </div>'; |
| 210 | 210 | } |
| 211 | 211 | } |
| 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.select-a-row').' |
|
| 217 | + '.\Lang::get('message.select-a-row') . ' |
|
| 218 | 218 | </div>'; |
| 219 | 219 | //echo \Lang::get('message.select-a-row'); |
| 220 | 220 | } |
| 221 | 221 | } catch (\Exception $e) { |
| 222 | 222 | echo "<div class='alert alert-danger alert-dismissable'> |
| 223 | 223 | <i class='fa fa-ban'></i> |
| 224 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 224 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 225 | 225 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 226 | - '.$e->getMessage().' |
|
| 226 | + '.$e->getMessage() . ' |
|
| 227 | 227 | </div>'; |
| 228 | 228 | } |
| 229 | 229 | } |
@@ -4,11 +4,9 @@ |
||
| 4 | 4 | |
| 5 | 5 | use App\Http\Controllers\Controller; |
| 6 | 6 | use App\Http\Requests\Product\AddonRequest; |
| 7 | -use App\Model\Payment\Plan; |
|
| 8 | 7 | use App\Model\Product\Addon; |
| 9 | 8 | use App\Model\Product\Product; |
| 10 | 9 | use App\Model\Product\ProductAddonRelation; |
| 11 | -use App\Model\Product\Subscription; |
|
| 12 | 10 | use Illuminate\Http\Request; |
| 13 | 11 | |
| 14 | 12 | class AddonController extends Controller |
@@ -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) { |
|
| 46 | - return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
|
| 45 | + ->addColumn('#', function($model) { |
|
| 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,8 +56,8 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | return implode(',', $products); |
| 58 | 58 | }) |
| 59 | - ->addColumn('action', function ($model) { |
|
| 60 | - return '<a href='.url('addons/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 59 | + ->addColumn('action', function($model) { |
|
| 60 | + return '<a href=' . url('addons/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 61 | 61 | }) |
| 62 | 62 | ->searchColumns('name') |
| 63 | 63 | ->orderColumns('name') |
@@ -194,34 +194,34 @@ discard block |
||
| 194 | 194 | } else { |
| 195 | 195 | echo "<div class='alert alert-danger alert-dismissable'> |
| 196 | 196 | <i class='fa fa-ban'></i> |
| 197 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 197 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 198 | 198 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 199 | - '.\Lang::get('message.no-record').' |
|
| 199 | + '.\Lang::get('message.no-record') . ' |
|
| 200 | 200 | </div>'; |
| 201 | 201 | //echo \Lang::get('message.no-record') . ' [id=>' . $id . ']'; |
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | 204 | echo "<div class='alert alert-success alert-dismissable'> |
| 205 | 205 | <i class='fa fa-ban'></i> |
| 206 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.success').' |
|
| 206 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.success') . ' |
|
| 207 | 207 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 208 | - '.\Lang::get('message.deleted-successfully').' |
|
| 208 | + '.\Lang::get('message.deleted-successfully') . ' |
|
| 209 | 209 | </div>'; |
| 210 | 210 | } else { |
| 211 | 211 | echo "<div class='alert alert-danger alert-dismissable'> |
| 212 | 212 | <i class='fa fa-ban'></i> |
| 213 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 213 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 214 | 214 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 215 | - '.\Lang::get('message.select-a-row').' |
|
| 215 | + '.\Lang::get('message.select-a-row') . ' |
|
| 216 | 216 | </div>'; |
| 217 | 217 | //echo \Lang::get('message.select-a-row'); |
| 218 | 218 | } |
| 219 | 219 | } catch (\Exception $e) { |
| 220 | 220 | echo "<div class='alert alert-danger alert-dismissable'> |
| 221 | 221 | <i class='fa fa-ban'></i> |
| 222 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 222 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 223 | 223 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 224 | - '.$e->getMessage().' |
|
| 224 | + '.$e->getMessage() . ' |
|
| 225 | 225 | </div>'; |
| 226 | 226 | } |
| 227 | 227 | } |
@@ -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 | */ |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | /** |
| 63 | 63 | * Store a newly created resource in storage. |
| 64 | 64 | * |
| 65 | - * @return Response |
|
| 65 | + * @return \Illuminate\Http\RedirectResponse |
|
| 66 | 66 | */ |
| 67 | 67 | public function store(Request $request) { |
| 68 | 68 | $this->service->fill($request->input())->save(); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * Update the specified resource in storage. |
| 97 | 97 | * |
| 98 | 98 | * @param int $id |
| 99 | - * @return Response |
|
| 99 | + * @return \Illuminate\Http\RedirectResponse |
|
| 100 | 100 | */ |
| 101 | 101 | public function update($id, Request $request) { |
| 102 | 102 | $service = $this->service->where('id',$id)->first(); |
@@ -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) { |
|
| 51 | - return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
|
| 50 | + ->addColumn('#', function($model) { |
|
| 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,8 +61,8 @@ discard block |
||
| 61 | 61 | //dd($result); |
| 62 | 62 | return implode(',', $result); |
| 63 | 63 | }) |
| 64 | - ->addColumn('action', function ($model) { |
|
| 65 | - return '<a href='.url('bundles/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 64 | + ->addColumn('action', function($model) { |
|
| 65 | + return '<a href=' . url('bundles/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a>"; |
|
| 66 | 66 | }) |
| 67 | 67 | ->searchColumns('name', 'item') |
| 68 | 68 | ->orderColumns('name') |
@@ -208,34 +208,34 @@ discard block |
||
| 208 | 208 | } else { |
| 209 | 209 | echo "<div class='alert alert-danger alert-dismissable'> |
| 210 | 210 | <i class='fa fa-ban'></i> |
| 211 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 211 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 212 | 212 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 213 | - '.\Lang::get('message.no-record').' |
|
| 213 | + '.\Lang::get('message.no-record') . ' |
|
| 214 | 214 | </div>'; |
| 215 | 215 | //echo \Lang::get('message.no-record') . ' [id=>' . $id . ']'; |
| 216 | 216 | } |
| 217 | 217 | } |
| 218 | 218 | echo "<div class='alert alert-success alert-dismissable'> |
| 219 | 219 | <i class='fa fa-ban'></i> |
| 220 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.success').' |
|
| 220 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.success') . ' |
|
| 221 | 221 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 222 | - '.\Lang::get('message.deleted-successfully').' |
|
| 222 | + '.\Lang::get('message.deleted-successfully') . ' |
|
| 223 | 223 | </div>'; |
| 224 | 224 | } else { |
| 225 | 225 | echo "<div class='alert alert-danger alert-dismissable'> |
| 226 | 226 | <i class='fa fa-ban'></i> |
| 227 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 227 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 228 | 228 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 229 | - '.\Lang::get('message.select-a-row').' |
|
| 229 | + '.\Lang::get('message.select-a-row') . ' |
|
| 230 | 230 | </div>'; |
| 231 | 231 | //echo \Lang::get('message.select-a-row'); |
| 232 | 232 | } |
| 233 | 233 | } catch (\Exception $e) { |
| 234 | 234 | echo "<div class='alert alert-danger alert-dismissable'> |
| 235 | 235 | <i class='fa fa-ban'></i> |
| 236 | - <b>".\Lang::get('message.alert').'!</b> '.\Lang::get('message.failed').' |
|
| 236 | + <b>".\Lang::get('message.alert') . '!</b> ' . \Lang::get('message.failed') . ' |
|
| 237 | 237 | <button type=button class=close data-dismiss=alert aria-hidden=true>×</button> |
| 238 | - '.$e->getMessage().' |
|
| 238 | + '.$e->getMessage() . ' |
|
| 239 | 239 | </div>'; |
| 240 | 240 | } |
| 241 | 241 | } |