update: new auth

This commit is contained in:
tokumeikoi
2022-07-28 15:05:48 +08:00
parent df8ea58456
commit 5f573f5306
5 changed files with 82 additions and 45 deletions

View File

@ -19,7 +19,7 @@ class PlanService
{
if ($this->plan->capacity_limit === NULL) return true;
$count = User::where('plan_id', $this->plan->plan_id)->count();
return $this->plan->capacity_limit - $count;
return ($this->plan->capacity_limit - $count) > 0;
}
public static function countActiveUsers()