trait HasTools

Traits

Trait HasQuickSearch.

Properties

static string $searchKey from  HasQuickSearch
$search from  HasQuickSearch
Collection $columns from  HasQuickSearch
Tools $tools

Header tools.

Methods

quickSearch($search = null)

No description

mixed|void
applyQuickSearch()

Apply the search query to the query.

addWhereBindings(string $query)

Add where bindings.

array
parseQueryBindings(array $queries)

Parse quick query bindings.

addWhereLikeBinding(string $column, bool $or, string $pattern)

Add where like binding to model query.

addWhereDatetimeBinding(string $column, bool $or, string $function, string $value)

Add where date time function binding to model query.

addWhereInBinding(string $column, bool $or, bool $not, string $values)

Add where in binding to the model query.

addWhereBetweenBinding(string $column, bool $or, string $start, string $end)

Add where between binding to the model query.

addWhereBasicBinding(string $column, bool $or, string $operator, string $value)

Add where basic binding to the model query.

bool
isShowTools()

是否显示导出按钮

disableTools(bool $disable = true)

Disable export.

tools(Closure $callback)

Setup grid tools.

string
renderHeaderTools()

Render custom tools.

initTools(Grid $grid)

Setup grid tools.

Details

in HasQuickSearch at line 37
QuickSearch quickSearch($search = null)

No description

Parameters

$search

Return Value

QuickSearch

in HasQuickSearch at line 56
protected mixed|void applyQuickSearch()

Apply the search query to the query.

Return Value

mixed|void

in HasQuickSearch at line 85
protected addWhereBindings(string $query)

Add where bindings.

Parameters

string $query

in HasQuickSearch at line 129
protected array parseQueryBindings(array $queries)

Parse quick query bindings.

Parameters

array $queries

Return Value

array

in HasQuickSearch at line 167
protected addWhereLikeBinding(string $column, bool $or, string $pattern)

Add where like binding to model query.

Parameters

string $column
bool $or
string $pattern

in HasQuickSearch at line 185
protected addWhereDatetimeBinding(string $column, bool $or, string $function, string $value)

Add where date time function binding to model query.

Parameters

string $column
bool $or
string $function
string $value

in HasQuickSearch at line 200
protected addWhereInBinding(string $column, bool $or, bool $not, string $values)

Add where in binding to the model query.

Parameters

string $column
bool $or
bool $not
string $values

in HasQuickSearch at line 225
protected addWhereBetweenBinding(string $column, bool $or, string $start, string $end)

Add where between binding to the model query.

Parameters

string $column
bool $or
string $start
string $end

in HasQuickSearch at line 240
protected addWhereBasicBinding(string $column, bool $or, string $operator, string $value)

Add where basic binding to the model query.

Parameters

string $column
bool $or
string $operator
string $value

at line 23
bool isShowTools()

是否显示导出按钮

Return Value

bool

at line 34
HasTools disableTools(bool $disable = true)

Disable export.

Parameters

bool $disable

Return Value

HasTools

at line 46
HasTools tools(Closure $callback)

Setup grid tools.

Parameters

Closure $callback

Return Value

HasTools

at line 57
string renderHeaderTools()

Render custom tools.

Return Value

string

at line 68
protected HasTools initTools(Grid $grid)

Setup grid tools.

Parameters

Grid $grid

Return Value

HasTools