示例#1
0
 /**
  * @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);
 }
示例#2
0
 /**
  * Create a map body.
  *
  * @param Blueprint $blueprint
  * @param Fluent    $command
  *
  * @return array
  */
 public function compileCreate(Blueprint $blueprint, Fluent $command)
 {
     $fields = $blueprint->getFields();
     $statement = $this->compileFields($fields);
     return $statement;
 }
示例#3
0
 /**
  * Execute the blueprint to build.
  *
  * @param Blueprint $blueprint
  */
 protected function build(Blueprint $blueprint)
 {
     $blueprint->build($this->connection, $this->grammar);
 }