trait Search

Properties

$yat_global_search
string|null $yat_global_search_label
bool $useGlobalSearch

Methods

void
useGlobalSearch(bool $status = true)

Enable or disable global search.

void
setSearchLabel(string $label)

Set the label for the global search input.

void
updatingSearch()

Handle updates to the global search input.

Collection
filteredData()

Filter the data based on global search (Array mode).

Builder
applySearchToQuery(Builder $query)

Apply global search to the Eloquent query.

Details

at line 18
void useGlobalSearch(bool $status = true)

Enable or disable global search.

Parameters

bool $status

Return Value

void

at line 28
void setSearchLabel(string $label)

Set the label for the global search input.

Parameters

string $label

Return Value

void

at line 40
void updatingSearch()

Handle updates to the global search input.

Resets pagination when search query changes.

Return Value

void

at line 50
Collection filteredData()

Filter the data based on global search (Array mode).

Return Value

Collection

at line 91
Builder applySearchToQuery(Builder $query)

Apply global search to the Eloquent query.

Parameters

Builder $query

Return Value

Builder