trait HasBuilder

Methods

static Builder
query()

Begin querying the model.

newEloquentBuilder(Builder $query)

Create a new Eloquent query builder for the model.

newQuery()

Get a new query builder for the model's table.

newModelQuery()

Get a new query builder that doesn't have any global scopes or eager loading.

newQueryWithoutRelationships()

Get a new query builder with no relationships loaded.

newQueryWithoutScopes()

Get a new query builder that doesn't have any global scopes.

newQueryWithoutScope(Scope|string $scope)

Get a new query instance without a given scope.

newQueryForRestoration(array|int|string $ids)

Get a new query to restore one or more models by their queueable IDs.

static Builder
on(UnitEnum|string|null $connection = null)

Begin querying the model on a given connection.

static Builder
onWriteConnection()

Begin querying the model on the write connection.

static Builder
with(array|string $relations)

Begin querying a model with eager loading.

Details

at line 20
static Builder query()

Begin querying the model.

Return Value

Builder

at line 30
Builder newEloquentBuilder(Builder $query)

Create a new Eloquent query builder for the model.

Parameters

Builder $query

Return Value

Builder

at line 40
Builder newQuery()

Get a new query builder for the model's table.

Return Value

Builder

at line 50
Builder newModelQuery()

Get a new query builder that doesn't have any global scopes or eager loading.

Return Value

Builder

at line 60
Builder newQueryWithoutRelationships()

Get a new query builder with no relationships loaded.

Return Value

Builder

at line 70
Builder newQueryWithoutScopes()

Get a new query builder that doesn't have any global scopes.

Return Value

Builder

at line 80
Builder newQueryWithoutScope(Scope|string $scope)

Get a new query instance without a given scope.

Parameters

Scope|string $scope

Return Value

Builder

at line 90
Builder newQueryForRestoration(array|int|string $ids)

Get a new query to restore one or more models by their queueable IDs.

Parameters

array|int|string $ids

Return Value

Builder

at line 100
static Builder on(UnitEnum|string|null $connection = null)

Begin querying the model on a given connection.

Parameters

UnitEnum|string|null $connection

Return Value

Builder

at line 110
static Builder onWriteConnection()

Begin querying the model on the write connection.

Return Value

Builder

at line 120
static Builder with(array|string $relations)

Begin querying a model with eager loading.

Parameters

array|string $relations

Return Value

Builder