@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | ->addColumn('version', function ($model) { |
92 | 92 | return $model['version']; |
93 | 93 | }) |
94 | - ->rawColumns(['name', 'description', 'author', 'website', 'version']) |
|
94 | + ->rawColumns(['name', 'description', 'author', 'website', 'version']) |
|
95 | 95 | ->make(true); |
96 | 96 | } |
97 | 97 | |
@@ -492,40 +492,40 @@ discard block |
||
492 | 492 | |
493 | 493 | return\ DataTables::of($activity_log) |
494 | 494 | // return \Datatable::collection($this->product->select('id', 'name', 'type', 'group')->where('id', '!=', 1)->get()) |
495 | - ->addColumn('checkbox', function ($model) { |
|
496 | - return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>'; |
|
497 | - }) |
|
498 | - ->addColumn('name', function ($model) { |
|
499 | - return ucfirst($model->log_name); |
|
500 | - }) |
|
501 | - ->addColumn('description', function ($model) { |
|
502 | - return ucfirst($model->description); |
|
503 | - }) |
|
495 | + ->addColumn('checkbox', function ($model) { |
|
496 | + return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>'; |
|
497 | + }) |
|
498 | + ->addColumn('name', function ($model) { |
|
499 | + return ucfirst($model->log_name); |
|
500 | + }) |
|
501 | + ->addColumn('description', function ($model) { |
|
502 | + return ucfirst($model->description); |
|
503 | + }) |
|
504 | 504 | // ->addColumn('subject_id', function ($model) { |
505 | 505 | // return ucfirst($model->subject_id); |
506 | 506 | // }) |
507 | - // ->addColumn('subject_type', function ($model) { |
|
508 | - // return ucfirst($model->subject_type); |
|
509 | - // }) |
|
510 | - ->addColumn('username', function ($model) { |
|
511 | - $causer_id = $model->causer_id; |
|
512 | - $names = User::where('id', $causer_id)->pluck('last_name', 'first_name'); |
|
513 | - foreach ($names as $key => $value) { |
|
514 | - $fullName = $key.' '.$value; |
|
515 | - |
|
516 | - return $fullName; |
|
517 | - } |
|
518 | - // return $fullName; |
|
519 | - }) |
|
520 | - ->addColumn('role', function ($model) { |
|
521 | - $causer_id = $model->causer_id; |
|
522 | - $role = User::where('id', $causer_id)->pluck('role'); |
|
523 | - |
|
524 | - return json_decode($role); |
|
525 | - }) |
|
526 | - // ->addColumn('causer_type', function ($model) { |
|
527 | - // return ucfirst($model->causer_type); |
|
528 | - // }) |
|
507 | + // ->addColumn('subject_type', function ($model) { |
|
508 | + // return ucfirst($model->subject_type); |
|
509 | + // }) |
|
510 | + ->addColumn('username', function ($model) { |
|
511 | + $causer_id = $model->causer_id; |
|
512 | + $names = User::where('id', $causer_id)->pluck('last_name', 'first_name'); |
|
513 | + foreach ($names as $key => $value) { |
|
514 | + $fullName = $key.' '.$value; |
|
515 | + |
|
516 | + return $fullName; |
|
517 | + } |
|
518 | + // return $fullName; |
|
519 | + }) |
|
520 | + ->addColumn('role', function ($model) { |
|
521 | + $causer_id = $model->causer_id; |
|
522 | + $role = User::where('id', $causer_id)->pluck('role'); |
|
523 | + |
|
524 | + return json_decode($role); |
|
525 | + }) |
|
526 | + // ->addColumn('causer_type', function ($model) { |
|
527 | + // return ucfirst($model->causer_type); |
|
528 | + // }) |
|
529 | 529 | ->addColumn('new', function ($model) { |
530 | 530 | $properties = ($model->properties); |
531 | 531 | $properties = (array_key_exists('attributes', $properties->toArray())) ? ($model->properties['attributes']) : null; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | //dd($result); |
45 | 45 | return \DataTables::of(new Collection($plugins)) |
46 | 46 | // ->searchColumns('name') |
47 | - ->addColumn('name', function ($model) { |
|
47 | + ->addColumn('name', function($model) { |
|
48 | 48 | if (array_has($model, 'path')) { |
49 | 49 | if ($model['status'] == 0) { |
50 | 50 | $activate = '<a href='.url('plugin/status/'.$model['path']).'>Activate</a>'; |
@@ -80,16 +80,16 @@ discard block |
||
80 | 80 | |
81 | 81 | return ucfirst($model['name']).$action; |
82 | 82 | }) |
83 | - ->addColumn('description', function ($model) { |
|
83 | + ->addColumn('description', function($model) { |
|
84 | 84 | return $model['description']; |
85 | 85 | }) |
86 | - ->addColumn('author', function ($model) { |
|
86 | + ->addColumn('author', function($model) { |
|
87 | 87 | return ucfirst($model['author']); |
88 | 88 | }) |
89 | - ->addColumn('website', function ($model) { |
|
89 | + ->addColumn('website', function($model) { |
|
90 | 90 | return '<a href='.$model['website'].' target=_blank>'.$model['website'].'</a>'; |
91 | 91 | }) |
92 | - ->addColumn('version', function ($model) { |
|
92 | + ->addColumn('version', function($model) { |
|
93 | 93 | return $model['version']; |
94 | 94 | }) |
95 | 95 | ->rawColumns(['name', 'description', 'author', 'website', 'version']) |
@@ -498,13 +498,13 @@ discard block |
||
498 | 498 | |
499 | 499 | return\ DataTables::of($activity_log) |
500 | 500 | // return \Datatable::collection($this->product->select('id', 'name', 'type', 'group')->where('id', '!=', 1)->get()) |
501 | - ->addColumn('checkbox', function ($model) { |
|
501 | + ->addColumn('checkbox', function($model) { |
|
502 | 502 | return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>'; |
503 | 503 | }) |
504 | - ->addColumn('name', function ($model) { |
|
504 | + ->addColumn('name', function($model) { |
|
505 | 505 | return ucfirst($model->log_name); |
506 | 506 | }) |
507 | - ->addColumn('description', function ($model) { |
|
507 | + ->addColumn('description', function($model) { |
|
508 | 508 | return ucfirst($model->description); |
509 | 509 | }) |
510 | 510 | // ->addColumn('subject_id', function ($model) { |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | // ->addColumn('subject_type', function ($model) { |
514 | 514 | // return ucfirst($model->subject_type); |
515 | 515 | // }) |
516 | - ->addColumn('username', function ($model) { |
|
516 | + ->addColumn('username', function($model) { |
|
517 | 517 | $causer_id = $model->causer_id; |
518 | 518 | $names = User::where('id', $causer_id)->pluck('last_name', 'first_name'); |
519 | 519 | foreach ($names as $key => $value) { |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | } |
524 | 524 | // return $fullName; |
525 | 525 | }) |
526 | - ->addColumn('role', function ($model) { |
|
526 | + ->addColumn('role', function($model) { |
|
527 | 527 | $causer_id = $model->causer_id; |
528 | 528 | $role = User::where('id', $causer_id)->pluck('role'); |
529 | 529 | |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | // ->addColumn('causer_type', function ($model) { |
533 | 533 | // return ucfirst($model->causer_type); |
534 | 534 | // }) |
535 | - ->addColumn('new', function ($model) { |
|
535 | + ->addColumn('new', function($model) { |
|
536 | 536 | $properties = ($model->properties); |
537 | 537 | $properties = (array_key_exists('attributes', $properties->toArray())) ? ($model->properties['attributes']) : null; |
538 | 538 | $display = ''; |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | return '--'; |
553 | 553 | } |
554 | 554 | }) |
555 | - ->addColumn('old', function ($model) { |
|
555 | + ->addColumn('old', function($model) { |
|
556 | 556 | $data = ($model->properties); |
557 | 557 | $oldData = (array_key_exists('old', $data->toArray())) ? ($model->properties['old']) : null; |
558 | 558 | if ($oldData != null) { |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | return '--'; |
570 | 570 | } |
571 | 571 | }) |
572 | - ->addColumn('created_at', function ($model) { |
|
572 | + ->addColumn('created_at', function($model) { |
|
573 | 573 | $created = new DateTime($model->created_at); |
574 | 574 | $tz = \Auth::user()->timezone()->first()->name; |
575 | 575 | $created->setTimezone(new DateTimeZone($tz)); |
@@ -579,7 +579,7 @@ discard block |
||
579 | 579 | return $newDate; |
580 | 580 | }) |
581 | 581 | |
582 | - ->rawColumns(['checkbox', 'name', 'description', 'username', 'role', 'new', 'old', 'created_at']) |
|
582 | + ->rawColumns(['checkbox', 'name', 'description', 'username', 'role', 'new', 'old', 'created_at']) |
|
583 | 583 | ->make(true); |
584 | 584 | } catch (\Exception $e) { |
585 | 585 | Bugsnag::notifyException($e); |
@@ -74,7 +74,7 @@ |
||
74 | 74 | return ''; |
75 | 75 | |
76 | 76 | // return "Product has been {$eventName}"; |
77 | - // \Auth::user()->activity; |
|
77 | + // \Auth::user()->activity; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -31,7 +31,7 @@ |
||
31 | 31 | return ''; |
32 | 32 | |
33 | 33 | // return "Product has been {$eventName}"; |
34 | - // \Auth::user()->activity; |
|
34 | + // \Auth::user()->activity; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | public function planPrice() |
@@ -33,6 +33,6 @@ |
||
33 | 33 | return ''; |
34 | 34 | |
35 | 35 | // return "Product has been {$eventName}"; |
36 | - // \Auth::user()->activity; |
|
36 | + // \Auth::user()->activity; |
|
37 | 37 | } |
38 | 38 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | return ''; |
38 | 38 | |
39 | 39 | // return "Product has been {$eventName}"; |
40 | - // \Auth::user()->activity; |
|
40 | + // \Auth::user()->activity; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | public function invoiceItem() |
@@ -12,7 +12,7 @@ |
||
12 | 12 | protected $fillable = ['name', 'description', 'days', 'ends_at', 'user_id', 'plan_id', 'order_id', 'deny_after_subscription', 'version', 'product_id']; |
13 | 13 | protected $dates = ['ends_at']; |
14 | 14 | protected static $logName = 'Subscription'; |
15 | - protected static $logAttributes = ['ends_at', 'user_id', 'plan_id', 'order_id', 'version', 'product_id']; |
|
15 | + protected static $logAttributes = ['ends_at', 'user_id', 'plan_id', 'order_id', 'version', 'product_id']; |
|
16 | 16 | protected static $logOnlyDirty = true; |
17 | 17 | |
18 | 18 | public function getDescriptionForEvent(string $eventName): string |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | protected static $logName = 'Product'; |
19 | 19 | |
20 | 20 | protected static $logAttributes = ['name', 'description', 'type', 'file', 'category', |
21 | - 'github_owner', 'github_repository', 'version', 'subscription', ]; |
|
21 | + 'github_owner', 'github_repository', 'version', 'subscription', ]; |
|
22 | 22 | |
23 | 23 | protected static $logOnlyDirty = true; |
24 | 24 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | return ''; |
41 | 41 | |
42 | 42 | // return "Product has been {$eventName}"; |
43 | - // \Auth::user()->activity; |
|
43 | + // \Auth::user()->activity; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | // protected static $recordEvents = ['deleted']; |
@@ -11,14 +11,14 @@ |
||
11 | 11 | use LogsActivity; |
12 | 12 | protected $table = 'products'; |
13 | 13 | protected $fillable = ['name', 'description', 'type', 'group', 'file', 'image', 'require_domain', 'category', |
14 | - 'stock_control', 'stock_qty', 'sort_order', 'tax_apply', 'retired', 'hidden', 'auto_terminate', |
|
14 | + 'stock_control', 'stock_qty', 'sort_order', 'tax_apply', 'retired', 'hidden', 'auto_terminate', |
|
15 | 15 | 'setup_order_placed', 'setup_first_payment', 'setup_accept_manually', 'no_auto_setup', 'shoping_cart_link', 'process_url', 'github_owner', 'github_repository', |
16 | 16 | 'deny_after_subscription', 'version', 'parent', 'subscription', ]; |
17 | 17 | |
18 | 18 | protected static $logName = 'Product'; |
19 | 19 | |
20 | 20 | protected static $logAttributes = ['name', 'description', 'type', 'file', 'category', |
21 | - 'github_owner', 'github_repository', 'version', 'subscription', ]; |
|
21 | + 'github_owner', 'github_repository', 'version', 'subscription', ]; |
|
22 | 22 | |
23 | 23 | protected static $logOnlyDirty = true; |
24 | 24 |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | return view('themes.default1.common.dashboard', compact('totalSalesINR', 'totalSalesUSD', |
47 | 47 | 'yearlySalesINR', 'yearlySalesUSD', 'monthlySalesINR', 'monthlySalesUSD', 'users', |
48 | 48 | |
49 | - 'count_users', 'arraylists', 'productSoldlists','orders','subscriptions','invoices', |
|
50 | - 'products', 'arrayCountList')); |
|
49 | + 'count_users', 'arraylists', 'productSoldlists','orders','subscriptions','invoices', |
|
50 | + 'products', 'arrayCountList')); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -156,9 +156,9 @@ discard block |
||
156 | 156 | { |
157 | 157 | $user = new User(); |
158 | 158 | $allUsers = $user->orderBy('created_at', 'desc')->where('active', 1)->where('mobile_verified', 1) |
159 | - ->take(8) |
|
160 | - ->get() |
|
161 | - ->toArray(); |
|
159 | + ->take(8) |
|
160 | + ->get() |
|
161 | + ->toArray(); |
|
162 | 162 | |
163 | 163 | return $allUsers; |
164 | 164 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $dayUtc = new Carbon('-30 days'); |
190 | 190 | $minus30Day = $dayUtc->toDateTimeString(); |
191 | 191 | $recentOrders = Order::where('created_at', '>', $minus30Day)->orderBy('created_at', 'desc') |
192 | - ->where('price_override', '>', 0)->get(); |
|
192 | + ->where('price_override', '>', 0)->get(); |
|
193 | 193 | |
194 | 194 | return $recentOrders; |
195 | 195 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | return view('themes.default1.common.dashboard', compact('totalSalesINR', 'totalSalesUSD', |
47 | 47 | 'yearlySalesINR', 'yearlySalesUSD', 'monthlySalesINR', 'monthlySalesUSD', 'users', |
48 | 48 | |
49 | - 'count_users', 'arraylists', 'productSoldlists','orders','subscriptions','invoices', |
|
49 | + 'count_users', 'arraylists', 'productSoldlists', 'orders', 'subscriptions', 'invoices', |
|
50 | 50 | 'products', 'arrayCountList')); |
51 | 51 | } |
52 | 52 |