@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -\Event::listen('App\Events\PaymentGateway', function ($event) { |
|
| 3 | +\Event::listen('App\Events\PaymentGateway', function($event) { |
|
| 4 | 4 | $controller = new App\Plugins\Paypal\Controllers\ProcessController(); |
| 5 | 5 | echo $controller->PassToPayment($event->para); |
| 6 | 6 | }); |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | $setting = $settings->find(1); |
| 174 | 174 | if ($request->hasFile('logo')) { |
| 175 | 175 | $name = $request->file('logo')->getClientOriginalName(); |
| 176 | - $destinationPath = public_path('common/images'); |
|
| 176 | + $destinationPath = public_path('common/images'); |
|
| 177 | 177 | $request->file('logo')->move($destinationPath, $name); |
| 178 | 178 | $setting->logo = $name; |
| 179 | 179 | } |
@@ -300,37 +300,37 @@ discard block |
||
| 300 | 300 | $query = $this->advanceSearch($from, $till, $delFrom, $delTill); |
| 301 | 301 | |
| 302 | 302 | return \DataTables::of($query->take(50)) |
| 303 | - ->setTotalRecords($query->count()) |
|
| 304 | - ->addColumn('checkbox', function ($model) { |
|
| 305 | - return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>'; |
|
| 306 | - }) |
|
| 307 | - ->addColumn('name', function ($model) { |
|
| 308 | - return ucfirst($model->log_name); |
|
| 309 | - }) |
|
| 310 | - ->addColumn('description', function ($model) { |
|
| 311 | - return ucfirst($model->description); |
|
| 312 | - }) |
|
| 313 | - ->addColumn('username', function ($model) { |
|
| 314 | - $causer_id = $model->causer_id; |
|
| 315 | - $names = User::where('id', $causer_id)->pluck('last_name', 'first_name'); |
|
| 316 | - foreach ($names as $key => $value) { |
|
| 317 | - $fullName = $key.' '.$value; |
|
| 318 | - |
|
| 319 | - return $fullName; |
|
| 320 | - } |
|
| 321 | - }) |
|
| 322 | - ->addColumn('role', function ($model) { |
|
| 323 | - $causer_id = $model->causer_id; |
|
| 324 | - $role = User::where('id', $causer_id)->pluck('role'); |
|
| 325 | - |
|
| 326 | - return json_decode($role); |
|
| 327 | - }) |
|
| 328 | - ->addColumn('new', function ($model) { |
|
| 329 | - $properties = ($model->properties); |
|
| 330 | - $newEntry = $this->getNewEntry($properties, $model); |
|
| 331 | - |
|
| 332 | - return $newEntry; |
|
| 333 | - }) |
|
| 303 | + ->setTotalRecords($query->count()) |
|
| 304 | + ->addColumn('checkbox', function ($model) { |
|
| 305 | + return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>'; |
|
| 306 | + }) |
|
| 307 | + ->addColumn('name', function ($model) { |
|
| 308 | + return ucfirst($model->log_name); |
|
| 309 | + }) |
|
| 310 | + ->addColumn('description', function ($model) { |
|
| 311 | + return ucfirst($model->description); |
|
| 312 | + }) |
|
| 313 | + ->addColumn('username', function ($model) { |
|
| 314 | + $causer_id = $model->causer_id; |
|
| 315 | + $names = User::where('id', $causer_id)->pluck('last_name', 'first_name'); |
|
| 316 | + foreach ($names as $key => $value) { |
|
| 317 | + $fullName = $key.' '.$value; |
|
| 318 | + |
|
| 319 | + return $fullName; |
|
| 320 | + } |
|
| 321 | + }) |
|
| 322 | + ->addColumn('role', function ($model) { |
|
| 323 | + $causer_id = $model->causer_id; |
|
| 324 | + $role = User::where('id', $causer_id)->pluck('role'); |
|
| 325 | + |
|
| 326 | + return json_decode($role); |
|
| 327 | + }) |
|
| 328 | + ->addColumn('new', function ($model) { |
|
| 329 | + $properties = ($model->properties); |
|
| 330 | + $newEntry = $this->getNewEntry($properties, $model); |
|
| 331 | + |
|
| 332 | + return $newEntry; |
|
| 333 | + }) |
|
| 334 | 334 | ->addColumn('old', function ($model) { |
| 335 | 335 | $data = ($model->properties); |
| 336 | 336 | $oldEntry = $this->getOldEntry($data, $model); |
@@ -374,39 +374,39 @@ discard block |
||
| 374 | 374 | $email_log = \DB::table('email_log')->get(); |
| 375 | 375 | |
| 376 | 376 | return\ DataTables::of($email_log) |
| 377 | - ->addColumn('checkbox', function ($model) { |
|
| 378 | - return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>'; |
|
| 379 | - }) |
|
| 380 | - ->addColumn('date', function ($model) { |
|
| 381 | - return ucfirst($model->date); |
|
| 382 | - }) |
|
| 383 | - ->addColumn('from', function ($model) { |
|
| 384 | - $from = Markdown::convertToHtml(ucfirst($model->from)); |
|
| 385 | - |
|
| 386 | - return $from; |
|
| 387 | - }) |
|
| 388 | - ->addColumn('to', function ($model) { |
|
| 389 | - $to = Markdown::convertToHtml(ucfirst($model->to)); |
|
| 390 | - |
|
| 391 | - return $to; |
|
| 392 | - }) |
|
| 393 | - ->addColumn('cc', function ($model) { |
|
| 394 | - $cc = '--'; |
|
| 395 | - |
|
| 396 | - return $cc; |
|
| 397 | - }) |
|
| 398 | - |
|
| 399 | - ->addColumn('subject', function ($model) { |
|
| 400 | - return ucfirst($model->subject); |
|
| 401 | - }) |
|
| 377 | + ->addColumn('checkbox', function ($model) { |
|
| 378 | + return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>'; |
|
| 379 | + }) |
|
| 380 | + ->addColumn('date', function ($model) { |
|
| 381 | + return ucfirst($model->date); |
|
| 382 | + }) |
|
| 383 | + ->addColumn('from', function ($model) { |
|
| 384 | + $from = Markdown::convertToHtml(ucfirst($model->from)); |
|
| 385 | + |
|
| 386 | + return $from; |
|
| 387 | + }) |
|
| 388 | + ->addColumn('to', function ($model) { |
|
| 389 | + $to = Markdown::convertToHtml(ucfirst($model->to)); |
|
| 390 | + |
|
| 391 | + return $to; |
|
| 392 | + }) |
|
| 393 | + ->addColumn('cc', function ($model) { |
|
| 394 | + $cc = '--'; |
|
| 395 | + |
|
| 396 | + return $cc; |
|
| 397 | + }) |
|
| 398 | + |
|
| 399 | + ->addColumn('subject', function ($model) { |
|
| 400 | + return ucfirst($model->subject); |
|
| 401 | + }) |
|
| 402 | 402 | ->addColumn('headers', function ($model) { |
| 403 | 403 | $headers = Markdown::convertToHtml(ucfirst($model->headers)); |
| 404 | 404 | |
| 405 | 405 | return $headers; |
| 406 | 406 | }) |
| 407 | - ->addColumn('status', function ($model) { |
|
| 408 | - return ucfirst($model->status); |
|
| 409 | - }) |
|
| 407 | + ->addColumn('status', function ($model) { |
|
| 408 | + return ucfirst($model->status); |
|
| 409 | + }) |
|
| 410 | 410 | |
| 411 | 411 | ->rawColumns(['checkbox', 'date', 'from', 'to', 'cc', |
| 412 | 412 | 'bcc', 'subject', 'headers', 'status', ]) |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | $plugins = $this->fetchConfig(); |
| 15 | 15 | return \DataTables::of(new Collection($plugins)) |
| 16 | 16 | // ->searchColumns('name') |
| 17 | - ->addColumn('name', function ($model) { |
|
| 17 | + ->addColumn('name', function($model) { |
|
| 18 | 18 | if (array_has($model, 'path')) { |
| 19 | 19 | if ($model['status'] == 0) { |
| 20 | 20 | $activate = '<a href='.url('plugin/status/'.$model['name']).'>Activate</a>'; |
@@ -50,16 +50,16 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | return ucfirst($model['name']).$action; |
| 52 | 52 | }) |
| 53 | - ->addColumn('description', function ($model) { |
|
| 53 | + ->addColumn('description', function($model) { |
|
| 54 | 54 | return $model['description']; |
| 55 | 55 | }) |
| 56 | - ->addColumn('author', function ($model) { |
|
| 56 | + ->addColumn('author', function($model) { |
|
| 57 | 57 | return ucfirst($model['author']); |
| 58 | 58 | }) |
| 59 | - ->addColumn('website', function ($model) { |
|
| 59 | + ->addColumn('website', function($model) { |
|
| 60 | 60 | return '<a href='.$model['website'].' target=_blank>'.$model['website'].'</a>'; |
| 61 | 61 | }) |
| 62 | - ->addColumn('version', function ($model) { |
|
| 62 | + ->addColumn('version', function($model) { |
|
| 63 | 63 | return $model['version']; |
| 64 | 64 | }) |
| 65 | 65 | ->rawColumns(['name', 'description', 'author', 'website', 'version']) |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | $serial_key = $this->checkSerialKey($faveo_encrypted_key, $order_number); |
| 97 | 97 | |
| 98 | 98 | \Log::emergency(json_encode(['domain' => $request->input('domain'), |
| 99 | - 'serial' => $serial_key, 'order' => $order_number, ])); |
|
| 99 | + 'serial' => $serial_key, 'order' => $order_number, ])); |
|
| 100 | 100 | $result = []; |
| 101 | 101 | if ($request_type == 'install') { |
| 102 | 102 | $result = $this->verificationResult($order_number, $serial_key); |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | ->value('serial_key'); |
| 351 | 351 | |
| 352 | 352 | $this_order = $order |
| 353 | - ->where('number', $faveo_encrypted_order_number) |
|
| 353 | + ->where('number', $faveo_encrypted_order_number) |
|
| 354 | 354 | ->first(); |
| 355 | 355 | if ($this_order && $orderSerialKey == $faveo_serial_key) { |
| 356 | 356 | $product_id = $this_order->product; |
@@ -398,8 +398,8 @@ discard block |
||
| 398 | 398 | |
| 399 | 399 | public function checkUpdatesExpiry(Request $request) |
| 400 | 400 | { |
| 401 | - $v = \Validator::make($request->all(), [ |
|
| 402 | - 'order_number' =>'required', |
|
| 401 | + $v = \Validator::make($request->all(), [ |
|
| 402 | + 'order_number' =>'required', |
|
| 403 | 403 | ]); |
| 404 | 404 | if ($v->fails()) { |
| 405 | 405 | $error = $v->errors(); |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | |
| 416 | 416 | } |
| 417 | 417 | } |
| 418 | - return ['status' => 'fails', 'message' => 'do-not-allow-auto-update']; |
|
| 418 | + return ['status' => 'fails', 'message' => 'do-not-allow-auto-update']; |
|
| 419 | 419 | } catch (\Exception $e) { |
| 420 | 420 | $result = ['status'=>'fails','error' => $e->getMessage()]; |
| 421 | 421 | return $result; |
@@ -407,17 +407,17 @@ |
||
| 407 | 407 | } |
| 408 | 408 | try { |
| 409 | 409 | $order_number = $request->input('order_number'); |
| 410 | - $orderId = Order::where('number','LIKE',$order_number)->pluck('id')->first(); |
|
| 411 | - if($orderId){ |
|
| 412 | - $expiryDate = Subscription::where('order_id',$orderId)->pluck('update_ends_at')->first(); |
|
| 413 | - if(\Carbon\Carbon::now()->toDateTimeString() < $expiryDate->toDateTimeString()){ |
|
| 410 | + $orderId = Order::where('number', 'LIKE', $order_number)->pluck('id')->first(); |
|
| 411 | + if ($orderId) { |
|
| 412 | + $expiryDate = Subscription::where('order_id', $orderId)->pluck('update_ends_at')->first(); |
|
| 413 | + if (\Carbon\Carbon::now()->toDateTimeString() < $expiryDate->toDateTimeString()) { |
|
| 414 | 414 | return ['status' => 'success', 'message' => 'allow-auto-update']; |
| 415 | 415 | |
| 416 | 416 | } |
| 417 | 417 | } |
| 418 | 418 | return ['status' => 'fails', 'message' => 'do-not-allow-auto-update']; |
| 419 | 419 | } catch (\Exception $e) { |
| 420 | - $result = ['status'=>'fails','error' => $e->getMessage()]; |
|
| 420 | + $result = ['status'=>'fails', 'error' => $e->getMessage()]; |
|
| 421 | 421 | return $result; |
| 422 | 422 | |
| 423 | 423 | } |
@@ -408,9 +408,9 @@ |
||
| 408 | 408 | try { |
| 409 | 409 | $order_number = $request->input('order_number'); |
| 410 | 410 | $orderId = Order::where('number','LIKE',$order_number)->pluck('id')->first(); |
| 411 | - if($orderId){ |
|
| 411 | + if($orderId) { |
|
| 412 | 412 | $expiryDate = Subscription::where('order_id',$orderId)->pluck('update_ends_at')->first(); |
| 413 | - if(\Carbon\Carbon::now()->toDateTimeString() < $expiryDate->toDateTimeString()){ |
|
| 413 | + if(\Carbon\Carbon::now()->toDateTimeString() < $expiryDate->toDateTimeString()) { |
|
| 414 | 414 | return ['status' => 'success', 'message' => 'allow-auto-update']; |
| 415 | 415 | |
| 416 | 416 | } |
@@ -52,8 +52,8 @@ discard block |
||
| 52 | 52 | return\ DataTables::of($product_group) |
| 53 | 53 | // return \Datatable::of($this->group->select('id', 'name')->get()) |
| 54 | 54 | |
| 55 | - ->addColumn('checkbox', function ($model) { |
|
| 56 | - return "<input type='checkbox' class='group_checkbox' |
|
| 55 | + ->addColumn('checkbox', function ($model) { |
|
| 56 | + return "<input type='checkbox' class='group_checkbox' |
|
| 57 | 57 | value=".$model->id.' name=select[] id=check>'; |
| 58 | 58 | }) |
| 59 | 59 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | 'pricing_templates_id' => 'required', |
| 102 | 102 | ], [ |
| 103 | 103 | 'pricing_templates_id.required'=> 'Please Select a Template', |
| 104 | - ]); |
|
| 104 | + ]); |
|
| 105 | 105 | |
| 106 | 106 | try { |
| 107 | 107 | $this->group->fill($request->input())->save(); |
@@ -52,22 +52,22 @@ |
||
| 52 | 52 | return\ DataTables::of($product_group) |
| 53 | 53 | // return \Datatable::of($this->group->select('id', 'name')->get()) |
| 54 | 54 | |
| 55 | - ->addColumn('checkbox', function ($model) { |
|
| 55 | + ->addColumn('checkbox', function($model) { |
|
| 56 | 56 | return "<input type='checkbox' class='group_checkbox' |
| 57 | 57 | value=".$model->id.' name=select[] id=check>'; |
| 58 | 58 | }) |
| 59 | 59 | |
| 60 | - ->addColumn('name', function ($model) { |
|
| 60 | + ->addColumn('name', function($model) { |
|
| 61 | 61 | return ucfirst($model->name); |
| 62 | 62 | }) |
| 63 | 63 | // ->showColumns('name') |
| 64 | 64 | |
| 65 | - ->addColumn('action', function ($model) { |
|
| 65 | + ->addColumn('action', function($model) { |
|
| 66 | 66 | return '<a href='.url('groups/'.$model->id.'/edit'). |
| 67 | 67 | " class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' |
| 68 | 68 | style='color:white;'> </i> Edit</a>"; |
| 69 | 69 | }) |
| 70 | - ->rawColumns(['checkbox', 'name', 'action']) |
|
| 70 | + ->rawColumns(['checkbox', 'name', 'action']) |
|
| 71 | 71 | ->make(true); |
| 72 | 72 | } |
| 73 | 73 | |