route('team'); $allow_seats = $team->allow_seats; $used_seats = $team->members()->count(); if ($allow_seats <= $used_seats) { $fail(__('You have reached the maximum number of seats allowed for this team.')); } } }