@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | * |
| 109 | 109 | * @param Request $request |
| 110 | 110 | * |
| 111 | - * @return type |
|
| 111 | + * @return \Illuminate\Http\RedirectResponse |
|
| 112 | 112 | */ |
| 113 | 113 | public function postPlugins(Request $request) |
| 114 | 114 | { |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | /** |
| 186 | 186 | * Delete the directory. |
| 187 | 187 | * |
| 188 | - * @param type $dir |
|
| 188 | + * @param string $dir |
|
| 189 | 189 | * |
| 190 | 190 | * @return bool |
| 191 | 191 | */ |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | //dd($result); |
| 40 | 40 | return \Datatable::collection(new Collection($plugins)) |
| 41 | 41 | ->searchColumns('name') |
| 42 | - ->addColumn('name', function ($model) { |
|
| 42 | + ->addColumn('name', function($model) { |
|
| 43 | 43 | if (array_has($model, 'path')) { |
| 44 | 44 | if ($model['status'] == 0) { |
| 45 | 45 | $activate = '<a href='.url('plugin/status/'.$model['path']).'>Activate</a>'; |
@@ -75,16 +75,16 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | return ucfirst($model['name']).$action; |
| 77 | 77 | }) |
| 78 | - ->addColumn('description', function ($model) { |
|
| 78 | + ->addColumn('description', function($model) { |
|
| 79 | 79 | return $model['description']; |
| 80 | 80 | }) |
| 81 | - ->addColumn('author', function ($model) { |
|
| 81 | + ->addColumn('author', function($model) { |
|
| 82 | 82 | return ucfirst($model['author']); |
| 83 | 83 | }) |
| 84 | - ->addColumn('website', function ($model) { |
|
| 84 | + ->addColumn('website', function($model) { |
|
| 85 | 85 | return '<a href='.$model['website'].' target=_blank>'.$model['website'].'</a>'; |
| 86 | 86 | }) |
| 87 | - ->addColumn('version', function ($model) { |
|
| 87 | + ->addColumn('version', function($model) { |
|
| 88 | 88 | return $model['version']; |
| 89 | 89 | }) |
| 90 | 90 | ->make(); |
@@ -901,6 +901,9 @@ |
||
| 901 | 901 | } |
| 902 | 902 | } |
| 903 | 903 | |
| 904 | + /** |
|
| 905 | + * @param string $userid |
|
| 906 | + */ |
|
| 904 | 907 | public function planCost($productid, $userid, $planid = '') |
| 905 | 908 | { |
| 906 | 909 | try { |
@@ -337,6 +337,9 @@ discard block |
||
| 337 | 337 | } |
| 338 | 338 | } |
| 339 | 339 | |
| 340 | + /** |
|
| 341 | + * @param string $result |
|
| 342 | + */ |
|
| 340 | 343 | public function submit($result, $url) |
| 341 | 344 | { |
| 342 | 345 | echo "<form action=$url method=post name=redirect>"; |
@@ -415,6 +418,9 @@ discard block |
||
| 415 | 418 | } |
| 416 | 419 | } |
| 417 | 420 | |
| 421 | + /** |
|
| 422 | + * @param string $data |
|
| 423 | + */ |
|
| 418 | 424 | public static function encryptByPublicKey($data) |
| 419 | 425 | { |
| 420 | 426 | $path = storage_path().DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'public.key'; |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | /** |
| 173 | 173 | * Store a newly created resource in storage. |
| 174 | 174 | * |
| 175 | - * @return Response |
|
| 175 | + * @return \Illuminate\Http\RedirectResponse |
|
| 176 | 176 | */ |
| 177 | 177 | public function store(OrderRequest $request) |
| 178 | 178 | { |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | * |
| 251 | 251 | * @param int $id |
| 252 | 252 | * |
| 253 | - * @return Response |
|
| 253 | + * @return \Illuminate\Http\RedirectResponse |
|
| 254 | 254 | */ |
| 255 | 255 | public function update($id, OrderRequest $request) |
| 256 | 256 | { |
@@ -267,7 +267,6 @@ discard block |
||
| 267 | 267 | /** |
| 268 | 268 | * Remove the specified resource from storage. |
| 269 | 269 | * |
| 270 | - * @param int $id |
|
| 271 | 270 | * |
| 272 | 271 | * @return Response |
| 273 | 272 | */ |
@@ -320,7 +319,7 @@ discard block |
||
| 320 | 319 | * |
| 321 | 320 | * @param Request $request |
| 322 | 321 | * |
| 323 | - * @return type |
|
| 322 | + * @return \Illuminate\Http\RedirectResponse |
|
| 324 | 323 | */ |
| 325 | 324 | public function orderExecute(Request $request) |
| 326 | 325 | { |
@@ -103,15 +103,15 @@ discard block |
||
| 103 | 103 | //return \Datatable::query($this->order->select('id', 'created_at', 'client', |
| 104 | 104 | //'price_override', 'order_status', 'number', 'serial_key')) |
| 105 | 105 | return \Datatable::Collection($query->get()) |
| 106 | - ->addColumn('#', function ($model) { |
|
| 106 | + ->addColumn('#', function($model) { |
|
| 107 | 107 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 108 | 108 | }) |
| 109 | - ->addColumn('date', function ($model) { |
|
| 109 | + ->addColumn('date', function($model) { |
|
| 110 | 110 | $date = $model->created_at; |
| 111 | 111 | |
| 112 | 112 | return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m A'); |
| 113 | 113 | }) |
| 114 | - ->addColumn('client', function ($model) { |
|
| 114 | + ->addColumn('client', function($model) { |
|
| 115 | 115 | $user = $this->user->where('id', $model->client)->first(); |
| 116 | 116 | $first = $user->first_name; |
| 117 | 117 | $last = $user->last_name; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'<a>'; |
| 121 | 121 | }) |
| 122 | 122 | ->showColumns('number', 'price_override', 'order_status') |
| 123 | - ->addColumn('ends_at', function ($model) { |
|
| 123 | + ->addColumn('ends_at', function($model) { |
|
| 124 | 124 | $end = '--'; |
| 125 | 125 | $ends = $model->subscription()->first(); |
| 126 | 126 | if ($ends) { |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | |
| 134 | 134 | return $end; |
| 135 | 135 | }) |
| 136 | - ->addColumn('action', function ($model) { |
|
| 136 | + ->addColumn('action', function($model) { |
|
| 137 | 137 | $sub = $model->subscription()->first(); |
| 138 | 138 | $status = $this->checkInvoiceStatusByOrderId($model->id); |
| 139 | 139 | $url = ''; |
@@ -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 | */ |
@@ -83,13 +83,13 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | // try { |
| 85 | 85 | return \Datatable::collection($this->product->select('id', 'name', 'type', 'group')->where('id', '!=', 1)->get()) |
| 86 | - ->addColumn('#', function ($model) { |
|
| 86 | + ->addColumn('#', function($model) { |
|
| 87 | 87 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 88 | 88 | }) |
| 89 | - ->addColumn('name', function ($model) { |
|
| 89 | + ->addColumn('name', function($model) { |
|
| 90 | 90 | return ucfirst($model->name); |
| 91 | 91 | }) |
| 92 | - ->addColumn('type', function ($model) { |
|
| 92 | + ->addColumn('type', function($model) { |
|
| 93 | 93 | //dd($model->type()); |
| 94 | 94 | if ($this->type->where('id', $model->type)->first()) { |
| 95 | 95 | return $this->type->where('id', $model->type)->first()->name; |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | return 'Not available'; |
| 98 | 98 | } |
| 99 | 99 | }) |
| 100 | - ->addColumn('group', function ($model) { |
|
| 100 | + ->addColumn('group', function($model) { |
|
| 101 | 101 | //dd($model->type()); |
| 102 | 102 | if ($this->group->where('id', $model->group)->first()) { |
| 103 | 103 | return $this->group->where('id', $model->group)->first()->name; |
@@ -105,21 +105,21 @@ discard block |
||
| 105 | 105 | return 'Not available'; |
| 106 | 106 | } |
| 107 | 107 | }) |
| 108 | - ->addColumn('price', function ($model) { |
|
| 108 | + ->addColumn('price', function($model) { |
|
| 109 | 109 | if ($this->price->where('product_id', $model->id)->first()) { |
| 110 | 110 | return $this->price->where('product_id', $model->id)->first()->price; |
| 111 | 111 | } else { |
| 112 | 112 | return 'Not available'; |
| 113 | 113 | } |
| 114 | 114 | }) |
| 115 | - ->addColumn('currency', function ($model) { |
|
| 115 | + ->addColumn('currency', function($model) { |
|
| 116 | 116 | if ($this->price->where('product_id', $model->id)->first()) { |
| 117 | 117 | return $this->price->where('product_id', $model->id)->first()->currency; |
| 118 | 118 | } else { |
| 119 | 119 | return 'Not available'; |
| 120 | 120 | } |
| 121 | 121 | }) |
| 122 | - ->addColumn('action', function ($model) { |
|
| 122 | + ->addColumn('action', function($model) { |
|
| 123 | 123 | $url = ''; |
| 124 | 124 | if ($model->type == 2) { |
| 125 | 125 | $url = '<a href='.url('product/download/'.$model->id)." class='btn btn-sm btn-primary'>Download</a>"; |
@@ -175,14 +175,14 @@ discard block |
||
| 175 | 175 | 'type' => 'required', |
| 176 | 176 | 'group' => 'required', |
| 177 | 177 | ]); |
| 178 | - $v->sometimes(['file', 'image', 'version'], 'required', function ($input) { |
|
| 178 | + $v->sometimes(['file', 'image', 'version'], 'required', function($input) { |
|
| 179 | 179 | return $input->type == 2 && $input->github_owner == '' && $input->github_repository == ''; |
| 180 | 180 | }); |
| 181 | 181 | |
| 182 | - $v->sometimes(['github_owner', 'github_repository'], 'required', function ($input) { |
|
| 182 | + $v->sometimes(['github_owner', 'github_repository'], 'required', function($input) { |
|
| 183 | 183 | return $input->type == 2 && $input->file == '' && $input->image == ''; |
| 184 | 184 | }); |
| 185 | - $v->sometimes(['currency', 'price'], 'required', function ($input) { |
|
| 185 | + $v->sometimes(['currency', 'price'], 'required', function($input) { |
|
| 186 | 186 | return $input->subscription != 1; |
| 187 | 187 | }); |
| 188 | 188 | if ($v->fails()) { |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | // $v->sometimes(['github_owner', 'github_repository'], 'required', function ($input) { |
| 316 | 316 | // return $input->type == 2 && $input->file == '' && $input->image == ''; |
| 317 | 317 | // }); |
| 318 | - $v->sometimes(['currency', 'price'], 'required', function ($input) { |
|
| 318 | + $v->sometimes(['currency', 'price'], 'required', function($input) { |
|
| 319 | 319 | return $input->subscription != 1; |
| 320 | 320 | }); |
| 321 | 321 | if ($v->fails()) { |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | /** |
| 122 | 122 | * Store a newly created resource in storage. |
| 123 | 123 | * |
| 124 | - * @return Response |
|
| 124 | + * @return \Illuminate\Http\RedirectResponse |
|
| 125 | 125 | */ |
| 126 | 126 | public function store(ClientRequest $request) |
| 127 | 127 | { |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | * |
| 196 | 196 | * @param int $id |
| 197 | 197 | * |
| 198 | - * @return Response |
|
| 198 | + * @return \Illuminate\Http\RedirectResponse |
|
| 199 | 199 | */ |
| 200 | 200 | public function update($id, ClientRequest $request) |
| 201 | 201 | { |
@@ -208,7 +208,6 @@ discard block |
||
| 208 | 208 | /** |
| 209 | 209 | * Remove the specified resource from storage. |
| 210 | 210 | * |
| 211 | - * @param int $id |
|
| 212 | 211 | * |
| 213 | 212 | * @return Response |
| 214 | 213 | */ |
@@ -296,6 +295,9 @@ discard block |
||
| 296 | 295 | return $join; |
| 297 | 296 | } |
| 298 | 297 | |
| 298 | + /** |
|
| 299 | + * @param string $name |
|
| 300 | + */ |
|
| 299 | 301 | public function soldEdition($name) |
| 300 | 302 | { |
| 301 | 303 | $invoice = new \App\Model\Order\InvoiceItem(); |
@@ -313,6 +315,9 @@ discard block |
||
| 313 | 315 | return $products; |
| 314 | 316 | } |
| 315 | 317 | |
| 318 | + /** |
|
| 319 | + * @param User $user |
|
| 320 | + */ |
|
| 316 | 321 | public function sendWelcomeMail($user) |
| 317 | 322 | { |
| 318 | 323 | $activate_model = new AccountActivate(); |
@@ -73,14 +73,14 @@ discard block |
||
| 73 | 73 | $user = $this->advanceSearch($name, $username, $company, $mobile, $email, $country, $industry, $company_type, $company_size); |
| 74 | 74 | |
| 75 | 75 | return \Datatable::query($user) |
| 76 | - ->addColumn('#', function ($model) { |
|
| 76 | + ->addColumn('#', function($model) { |
|
| 77 | 77 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 78 | 78 | }) |
| 79 | - ->addColumn('first_name', function ($model) { |
|
| 79 | + ->addColumn('first_name', function($model) { |
|
| 80 | 80 | return '<a href='.url('clients/'.$model->id).'>'.ucfirst($model->first_name).' '.ucfirst($model->last_name).'</a>'; |
| 81 | 81 | }) |
| 82 | 82 | ->showColumns('email', 'created_at') |
| 83 | - ->addColumn('active', function ($model) { |
|
| 83 | + ->addColumn('active', function($model) { |
|
| 84 | 84 | if ($model->active == 1) { |
| 85 | 85 | $email = "<span class='glyphicon glyphicon-envelope' style='color:green' title='verified email'></span>"; |
| 86 | 86 | } else { |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | return $email.' '.$mobile; |
| 96 | 96 | }) |
| 97 | - ->addColumn('action', function ($model) { |
|
| 97 | + ->addColumn('action', function($model) { |
|
| 98 | 98 | return '<a href='.url('clients/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>" |
| 99 | 99 | .' <a href='.url('clients/'.$model->id)." class='btn btn-sm btn-primary'>View</a>"; |
| 100 | 100 | }) |
@@ -498,6 +498,10 @@ |
||
| 498 | 498 | @return |
| 499 | 499 | list of data fields ( ready to be used in SQL query ) |
| 500 | 500 | */ |
| 501 | + |
|
| 502 | + /** |
|
| 503 | + * @param DBDataWrapper $db |
|
| 504 | + */ |
|
| 501 | 505 | public function db_names_list($db) |
| 502 | 506 | { |
| 503 | 507 | $out = []; |
@@ -9,19 +9,19 @@ |
||
| 9 | 9 | **/ |
| 10 | 10 | class DataRequestConfig |
| 11 | 11 | { |
| 12 | - private $filters; //!< array of filtering rules |
|
| 13 | - private $relation = false; //!< ID or other element used for linking hierarchy |
|
| 14 | - private $sort_by; //!< sorting field |
|
| 15 | - private $start; //!< start of requested data |
|
| 16 | - private $count; //!< length of requested data |
|
| 12 | + private $filters; //!< array of filtering rules |
|
| 13 | + private $relation = false; //!< ID or other element used for linking hierarchy |
|
| 14 | + private $sort_by; //!< sorting field |
|
| 15 | + private $start; //!< start of requested data |
|
| 16 | + private $count; //!< length of requested data |
|
| 17 | 17 | |
| 18 | 18 | private $order = false; |
| 19 | 19 | private $user; |
| 20 | 20 | private $version; |
| 21 | 21 | |
| 22 | 22 | //for render_sql |
| 23 | - private $source; //!< souce table or another source destination |
|
| 24 | - private $fieldset; //!< set of data, which need to be retrieved from source |
|
| 23 | + private $source; //!< souce table or another source destination |
|
| 24 | + private $fieldset; //!< set of data, which need to be retrieved from source |
|
| 25 | 25 | |
| 26 | 26 | /*! constructor |
| 27 | 27 | |
@@ -147,6 +147,9 @@ |
||
| 147 | 147 | $this->demu = $path; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | + /** |
|
| 151 | + * @param EventMaster $master |
|
| 152 | + */ |
|
| 150 | 153 | public function set_event($master, $name) |
| 151 | 154 | { |
| 152 | 155 | $this->event = $master; |
@@ -67,6 +67,10 @@ |
||
| 67 | 67 | self::$eventsStatic[$name][] = $method; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | + /** |
|
| 71 | + * @param string $name |
|
| 72 | + * @param Connector $method |
|
| 73 | + */ |
|
| 70 | 74 | public static function trigger_static($name, $method) |
| 71 | 75 | { |
| 72 | 76 | $arg_list = func_get_args(); |