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

byte() public method

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

Usage Example

Ejemplo n.º 1
0
 /**
  * @test
  */
 public function it_adds_a_byte_map()
 {
     $blueprint = new Blueprint('post');
     $blueprint->create();
     $blueprint->byte('size');
     $statement = $blueprint->toDSL($this->getGrammar());
     $this->assertEquals(['size' => ['type' => 'byte']], $statement);
 }