We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ae7980 commit 76f6200Copy full SHA for 76f6200
tests/RelationsTest.php
@@ -292,6 +292,15 @@ public function testMorph()
292
$relations = $user->getRelations();
293
$this->assertTrue(array_key_exists('photos', $relations));
294
$this->assertEquals(1, $relations['photos']->count());
295
+
296
+ $photos = Photo::with('imageable')->get();
297
+ $relations = $photos[0]->getRelations();
298
+ $this->assertTrue(array_key_exists('imageable', $relations));
299
+ $this->assertInstanceOf('User', $relations['imageable']);
300
301
+ $relations = $photos[1]->getRelations();
302
303
+ $this->assertInstanceOf('Client', $relations['imageable']);
304
}
305
306
public function testEmbedsManySave()
0 commit comments