create(); Album::factory(5)->for($artist)->create(); $this->getAs('api/artists/' . $artist->id . '/albums') ->assertJsonStructure(['*' => AlbumResource::JSON_STRUCTURE]); } }