Use laravel v5.5 withCount manual aliases

This commit is contained in:
snipe
2019-05-22 00:50:48 -07:00
parent 144a32b1ca
commit 20d0dce73e
8 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ class ApiStatuslabelsCest
$response = json_decode($I->grabResponse(), true);
// sample verify
$statuslabel = App\Models\Statuslabel::orderByDesc('created_at')
->withCount('assets')
->withCount('assets as assets_count')
->take(10)->get()->shuffle()->first();
$I->seeResponseContainsJson($I->removeTimestamps((new StatuslabelsTransformer)->transformStatuslabel($statuslabel)));
}