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

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

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

Usage Example

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