public tokenCount ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent | ||
$field | string | |
$attributes | array | |
return | Illuminate\Support\Fluent |
public function tokenCount($field, $attributes = [])
{
return $this->addField('token_count', $field, $attributes);
}
/** * @test */ public function it_adds_a_token_count_map() { $blueprint = new Blueprint('post'); $blueprint->create(); $blueprint->tokenCount('token'); $statement = $blueprint->toDSL($this->getGrammar()); $this->assertEquals(['token' => ['type' => 'token_count']], $statement); }