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 ebab4eb commit a235700Copy full SHA for a235700
tests/ModelTest.php
@@ -495,6 +495,22 @@ public function testDotNotation()
495
$this->assertEquals('Strasbourg', $user['address.city']);
496
}
497
498
+ public function testMultipleLevelDotNotation()
499
+ {
500
+ $book = Book::create([
501
+ 'title' => 'A Game of Thrones',
502
+ 'chapters' => [
503
+ 'one' => [
504
+ 'title' => 'The first chapter',
505
+ ],
506
507
+ ]);
508
+
509
+ $this->assertEquals(['one' => ['title' => 'The first chapter']], $book->chapters);
510
+ $this->assertEquals(['title' => 'The first chapter'], $book['chapters.one']);
511
+ $this->assertEquals('The first chapter', $book['chapters.one.title']);
512
+ }
513
514
public function testGetDirtyDates()
515
{
516
$user = new User();
0 commit comments