Sleimanx2\Plastic\Map\Blueprint::float PHP Method

float() public method

Add a float field to the map.
public float ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
return Illuminate\Support\Fluent
    public function float($field, $attributes = [])
    {
        return $this->addField('float', $field, $attributes);
    }

Usage Example

Esempio n. 1
0
 /**
  * @test
  */
 public function it_adds_a_float_map()
 {
     $blueprint = new Blueprint('post');
     $blueprint->create();
     $blueprint->float('currency');
     $statement = $blueprint->toDSL($this->getGrammar());
     $this->assertEquals(['currency' => ['type' => 'float']], $statement);
 }