mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixed free_seats_count variable name
(I forgot that Laravel switched camel case to snake case for their old 5.4 withCount variables)
This commit is contained in:
parent
78fb2b2239
commit
d596ced0a0
|
@ -25,7 +25,7 @@ class LicensesController extends Controller
|
|||
public 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')) {
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue