A free open source IT asset/license management system
Fixed free_seats_count variable name
sniped596ced0a00f
diff --git a/app/Http/Controllers/Api/LicensesController.php b/app/Http/Controllers/Api/LicensesController.phpindex 3178960807..246122acc9 100644--- a/app/Http/Controllers/Api/LicensesController.php+++ b/app/Http/Controllers/Api/LicensesController.php@@ -25,7 +25,7 @@ class LicensesController extends Controllerpublic function index(Request $request){$this->authorize('view', License::class);- $licenses = Company::scopeCompanyables(License::with('company', 'manufacturer', 'freeSeats', 'supplier','category')->withCount('freeSeats as freeSeats_count'));+ $licenses = Company::scopeCompanyables(License::with('company', 'manufacturer', 'freeSeats', 'supplier','category')->withCount('freeSeats as free_seats_count'));if ($request->filled('company_id')) {diff --git a/tests/api/ApiLicensesCest.php b/tests/api/ApiLicensesCest.phpindex 73037fbdbc..39073bdf2c 100644--- a/tests/api/ApiLicensesCest.php+++ b/tests/api/ApiLicensesCest.php@@ -31,7 +31,7 @@ class ApiLicensesCest$response = json_decode($I->grabResponse(), true);// sample verify$license = App\Models\License::orderByDesc('created_at')- ->withCount('freeSeats as freeSeats_count')+ ->withCount('freeSeats as free_seats_count')->take(10)->get()->shuffle()->first();$I->seeResponseContainsJson($I->removeTimestamps((new LicensesTransformer)->transformLicense($license)));}