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

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

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

Usage Example

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