JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr 'Select Duration', 'Lifetime' => 'Lifetime', 'month' => 'Per Month', 'year' => 'Per Year', ]; public function status() { return [ __('Lifetime'), __('Per Month'), __('Per Year'), ]; } public static function total_plan() { return Plan::count(); } public static function most_purchese_plan() { $free_plan = Plan::where('price', '<=', 0)->first()->id; return User:: select('plans.name','plans.id', DB::raw('count(*) as total')) ->join('plans', 'plans.id' ,'=', 'users.plan') ->where('type', '=', 'company') ->where('plan', '!=', $free_plan) ->orderBy('total','Desc') ->groupBy('plans.name','plans.id') ->first(); } }