nested() public méthode

Add a nested map.
public nested ( $field, Closure $callback ) : Illuminate\Support\Fluent
$field
$callback Closure
Résultat Illuminate\Support\Fluent
Exemple #1
0
 /**
  * @test
  */
 public function it_adds_a_nested_map()
 {
     $blueprint = new Blueprint('post');
     $blueprint->create();
     $blueprint->nested('tags', function ($blueprint) {
         $blueprint->string('name');
     });
     $statement = $blueprint->toDSL($this->getGrammar());
     $this->assertEquals(['tags' => ['type' => 'nested', 'properties' => ['name' => ['type' => 'string']]]], $statement);
 }