From a8a3ca3624e5d12a6b8179411e772dfa1c5df0d2 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 18 Apr 2023 02:06:42 -0700 Subject: [PATCH] Use count on availSeats Signed-off-by: snipe --- app/Http/Controllers/Licenses/LicensesController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Licenses/LicensesController.php b/app/Http/Controllers/Licenses/LicensesController.php index f298bec890..5113a42a6c 100755 --- a/app/Http/Controllers/Licenses/LicensesController.php +++ b/app/Http/Controllers/Licenses/LicensesController.php @@ -236,7 +236,7 @@ class LicensesController extends Controller $license = License::with('assignedusers')->find($licenseId); $users_count = User::where('autoassign_licenses', '1')->count(); $total_seats_count = $license->totalSeatsByLicenseID(); - $available_seats_count = $license->availableSeats(); + $available_seats_count = $license->availableSeats()->count(); $checkedout_seats_count = ($total_seats_count - $available_seats_count);