public function string($field, $attributes = [])
{
return $this->addField('string', $field, $attributes);
}
/** * @test */ public function it_adds_a_object_map() { $blueprint = new Blueprint('post'); $blueprint->create(); $blueprint->object('tags', function ($blueprint) { $blueprint->string('name'); }); $statement = $blueprint->toDSL($this->getGrammar()); $this->assertEquals(['tags' => ['properties' => ['name' => ['type' => 'string']]]], $statement); }