我想得到你的推荐。
// Solution one
$total_user=User::count();
$active_user=User::where('active', 'active')->count();
// Solution two
$user = User::all();
$total_user=$user->count();
$active_user=$user->where('active','active')->count();
注意:用户数量将超过至少 100 万。
谢谢大家