Sleimanx2\Plastic\Map\Blueprint::double PHP Метод

double() публичный Метод

Add a double field to the map.
public double ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent
    public function double($field, $attributes = [])
    {
        return $this->addField('double', $field, $attributes);
    }

Usage Example

Пример #1
0
 /**
  * @test
  */
 public function it_adds_a_double_map()
 {
     $blueprint = new Blueprint('post');
     $blueprint->create();
     $blueprint->double('temp');
     $statement = $blueprint->toDSL($this->getGrammar());
     $this->assertEquals(['temp' => ['type' => 'double']], $statement);
 }