@@ -14,6 +14,7 @@ |
||
| 14 | 14 | /** |
| 15 | 15 | * Create a new event instance. |
| 16 | 16 | * |
| 17 | + * @param \Illuminate\Http\Request $para |
|
| 17 | 18 | * @return void |
| 18 | 19 | */ |
| 19 | 20 | public function __construct($para) |
@@ -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,14 +31,14 @@ |
||
| 31 | 31 | public function GetPages() |
| 32 | 32 | { |
| 33 | 33 | return \Datatable::collection($this->widget->get()) |
| 34 | - ->addColumn('#', function ($model) { |
|
| 34 | + ->addColumn('#', function($model) { |
|
| 35 | 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) { |
|
| 41 | + ->addColumn('action', function($model) { |
|
| 42 | 42 | return '<a href='.url('widgets/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
| 43 | 43 | }) |
| 44 | 44 | ->searchColumns('name', 'content') |
@@ -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,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 | |
@@ -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,11 +33,11 @@ |
||
| 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) { |
|
| 36 | + ->addColumn('#', function($model) { |
|
| 37 | 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 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | /** |
| 100 | 100 | * Store a newly created resource in storage. |
| 101 | 101 | * |
| 102 | - * @return Response |
|
| 102 | + * @return \Illuminate\Http\RedirectResponse |
|
| 103 | 103 | */ |
| 104 | 104 | public function store(PromotionRequest $request) |
| 105 | 105 | { |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | * |
| 170 | 170 | * @param int $id |
| 171 | 171 | * |
| 172 | - * @return Response |
|
| 172 | + * @return \Illuminate\Http\RedirectResponse |
|
| 173 | 173 | */ |
| 174 | 174 | public function update($id, PromotionRequest $request) |
| 175 | 175 | { |
@@ -196,7 +196,6 @@ discard block |
||
| 196 | 196 | /** |
| 197 | 197 | * Remove the specified resource from storage. |
| 198 | 198 | * |
| 199 | - * @param int $id |
|
| 200 | 199 | * |
| 201 | 200 | * @return Response |
| 202 | 201 | */ |
@@ -58,14 +58,14 @@ discard block |
||
| 58 | 58 | public function GetPromotion() |
| 59 | 59 | { |
| 60 | 60 | return \Datatable::collection($this->promotion->select('code', 'type', 'id')->get()) |
| 61 | - ->addColumn('#', function ($model) { |
|
| 61 | + ->addColumn('#', function($model) { |
|
| 62 | 62 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 63 | 63 | }) |
| 64 | 64 | ->showColumns('code') |
| 65 | - ->addColumn('type', function ($model) { |
|
| 65 | + ->addColumn('type', function($model) { |
|
| 66 | 66 | return $this->type->where('id', $model->type)->first()->name; |
| 67 | 67 | }) |
| 68 | - ->addColumn('products', function ($model) { |
|
| 68 | + ->addColumn('products', function($model) { |
|
| 69 | 69 | $selected = $this->promoRelation->select('product_id')->where('promotion_id', $model->id)->get(); |
| 70 | 70 | |
| 71 | 71 | foreach ($selected as $key => $select) { |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | return 'None'; |
| 78 | 78 | } |
| 79 | 79 | }) |
| 80 | - ->addColumn('action', function ($model) { |
|
| 80 | + ->addColumn('action', function($model) { |
|
| 81 | 81 | return '<a href='.url('promotions/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
| 82 | 82 | }) |
| 83 | 83 | ->searchColumns('products') |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | /** |
| 93 | 93 | * Store a newly created resource in storage. |
| 94 | 94 | * |
| 95 | - * @return Response |
|
| 95 | + * @return \Illuminate\Http\RedirectResponse |
|
| 96 | 96 | */ |
| 97 | 97 | public function store(TaxRequest $request) |
| 98 | 98 | { |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | * |
| 141 | 141 | * @param int $id |
| 142 | 142 | * |
| 143 | - * @return Response |
|
| 143 | + * @return \Illuminate\Http\RedirectResponse |
|
| 144 | 144 | */ |
| 145 | 145 | public function update($id, Request $request) |
| 146 | 146 | { |
@@ -157,7 +157,6 @@ discard block |
||
| 157 | 157 | /** |
| 158 | 158 | * Remove the specified resource from storage. |
| 159 | 159 | * |
| 160 | - * @param int $id |
|
| 161 | 160 | * |
| 162 | 161 | * @return Response |
| 163 | 162 | */ |
@@ -66,26 +66,26 @@ |
||
| 66 | 66 | public function GetTax() |
| 67 | 67 | { |
| 68 | 68 | return \Datatable::collection($this->tax->select('id', 'name', 'level', 'country', 'state', 'rate', 'tax_classes_id')->get()) |
| 69 | - ->addColumn('#', function ($model) { |
|
| 69 | + ->addColumn('#', function($model) { |
|
| 70 | 70 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 71 | 71 | }) |
| 72 | - ->addColumn('tax_classes_id', function ($model) { |
|
| 72 | + ->addColumn('tax_classes_id', function($model) { |
|
| 73 | 73 | |
| 74 | 74 | return ucfirst($this->tax_class->where('id', $model->tax_classes_id)->first()->name); |
| 75 | 75 | }) |
| 76 | 76 | ->showColumns('name', 'level') |
| 77 | - ->addColumn('country', function ($model) { |
|
| 77 | + ->addColumn('country', function($model) { |
|
| 78 | 78 | if ($this->country->where('country_code_char2', $model->country)->first()) { |
| 79 | 79 | return $this->country->where('country_code_char2', $model->country)->first()->country_name; |
| 80 | 80 | } |
| 81 | 81 | }) |
| 82 | - ->addColumn('state', function ($model) { |
|
| 82 | + ->addColumn('state', function($model) { |
|
| 83 | 83 | if ($this->state->where('state_subdivision_code', $model->state)->first()) { |
| 84 | 84 | return $this->state->where('state_subdivision_code', $model->state)->first()->state_subdivision_name; |
| 85 | 85 | } |
| 86 | 86 | }) |
| 87 | 87 | ->showColumns('rate') |
| 88 | - ->addColumn('action', function ($model) { |
|
| 88 | + ->addColumn('action', function($model) { |
|
| 89 | 89 | return '<a href='.url('tax/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
| 90 | 90 | }) |
| 91 | 91 | ->searchColumns('name') |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | /** |
| 85 | 85 | * Store a newly created resource in storage. |
| 86 | 86 | * |
| 87 | - * @return Response |
|
| 87 | + * @return \Illuminate\Http\RedirectResponse |
|
| 88 | 88 | */ |
| 89 | 89 | public function store(AddonRequest $request) |
| 90 | 90 | { |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | * |
| 146 | 146 | * @param int $id |
| 147 | 147 | * |
| 148 | - * @return Response |
|
| 148 | + * @return \Illuminate\Http\RedirectResponse |
|
| 149 | 149 | */ |
| 150 | 150 | public function update($id, AddonRequest $request) |
| 151 | 151 | { |
@@ -178,7 +178,6 @@ discard block |
||
| 178 | 178 | /** |
| 179 | 179 | * Remove the specified resource from storage. |
| 180 | 180 | * |
| 181 | - * @param int $id |
|
| 182 | 181 | * |
| 183 | 182 | * @return Response |
| 184 | 183 | */ |
@@ -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) { |
|
| 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') |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | /** |
| 69 | 69 | * Store a newly created resource in storage. |
| 70 | 70 | * |
| 71 | - * @return Response |
|
| 71 | + * @return \Illuminate\Http\RedirectResponse |
|
| 72 | 72 | */ |
| 73 | 73 | public function store(Request $request) |
| 74 | 74 | { |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * |
| 110 | 110 | * @param int $id |
| 111 | 111 | * |
| 112 | - * @return Response |
|
| 112 | + * @return \Illuminate\Http\RedirectResponse |
|
| 113 | 113 | */ |
| 114 | 114 | public function update($id, Request $request) |
| 115 | 115 | { |
@@ -122,7 +122,6 @@ discard block |
||
| 122 | 122 | /** |
| 123 | 123 | * Remove the specified resource from storage. |
| 124 | 124 | * |
| 125 | - * @param int $id |
|
| 126 | 125 | * |
| 127 | 126 | * @return Response |
| 128 | 127 | */ |
@@ -58,16 +58,16 @@ discard block |
||
| 58 | 58 | //dd($user); |
| 59 | 59 | |
| 60 | 60 | return \Datatable::collection($this->plan->get()) |
| 61 | - ->addColumn('#', function ($model) { |
|
| 61 | + ->addColumn('#', function($model) { |
|
| 62 | 62 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 63 | 63 | }) |
| 64 | 64 | ->showColumns('name') |
| 65 | - ->addColumn('days', function ($model) { |
|
| 65 | + ->addColumn('days', function($model) { |
|
| 66 | 66 | $months = $model->days / 30; |
| 67 | 67 | |
| 68 | 68 | return round($months); |
| 69 | 69 | }) |
| 70 | - ->addColumn('product', function ($model) { |
|
| 70 | + ->addColumn('product', function($model) { |
|
| 71 | 71 | $productid = $model->product; |
| 72 | 72 | $product = $this->product->find($productid); |
| 73 | 73 | $response = ''; |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | return ucfirst($response); |
| 79 | 79 | }) |
| 80 | - ->addColumn('action', function ($model) { |
|
| 80 | + ->addColumn('action', function($model) { |
|
| 81 | 81 | return '<a href='.url('plans/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
| 82 | 82 | }) |
| 83 | 83 | ->searchColumns('name', 'subscription', 'price', 'expiry') |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use App\Model\Payment\Period; |
| 8 | 8 | use App\Model\Payment\Plan; |
| 9 | 9 | use App\Model\Payment\PlanPrice; |
| 10 | -use App\Model\Product\Price; |
|
| 11 | 10 | use App\Model\Product\Product; |
| 12 | 11 | use App\Model\Product\Subscription; |
| 13 | 12 | use Illuminate\Http\Request; |
@@ -39,6 +39,9 @@ |
||
| 39 | 39 | |
| 40 | 40 | //*********** Padding Function ********************* |
| 41 | 41 | |
| 42 | + /** |
|
| 43 | + * @param integer $blockSize |
|
| 44 | + */ |
|
| 42 | 45 | public function pkcs5_pad($plainText, $blockSize) |
| 43 | 46 | { |
| 44 | 47 | $pad = $blockSize - (strlen($plainText) % $blockSize); |
@@ -39,12 +39,12 @@ |
||
| 39 | 39 | |
| 40 | 40 | //*********** Padding Function ********************* |
| 41 | 41 | |
| 42 | - public function pkcs5_pad($plainText, $blockSize) |
|
| 43 | - { |
|
| 44 | - $pad = $blockSize - (strlen($plainText) % $blockSize); |
|
| 42 | + public function pkcs5_pad($plainText, $blockSize) |
|
| 43 | + { |
|
| 44 | + $pad = $blockSize - (strlen($plainText) % $blockSize); |
|
| 45 | 45 | |
| 46 | - return $plainText.str_repeat(chr($pad), $pad); |
|
| 47 | - } |
|
| 46 | + return $plainText.str_repeat(chr($pad), $pad); |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | 49 | //********** Hexadecimal to Binary function for php 4.0 version ******** |
| 50 | 50 | |