HasBuilder
trait HasBuilder (View source)
Methods
Begin querying the model.
Get a new query builder for the model's table.
Get a new query builder that doesn't have any global scopes or eager loading.
Get a new query builder with no relationships loaded.
Get a new query builder that doesn't have any global scopes.
Get a new query to restore one or more models by their queueable IDs.
Begin querying the model on a given connection.
Begin querying the model on the write connection.
Begin querying a model with eager loading.
Details
static TBuilder
query()
Begin querying the model.
TBuilder
newEloquentBuilder(Builder $query)
Create a new Eloquent query builder for the model.
TBuilder
newQuery()
Get a new query builder for the model's table.
TBuilder
newModelQuery()
Get a new query builder that doesn't have any global scopes or eager loading.
TBuilder
newQueryWithoutRelationships()
Get a new query builder with no relationships loaded.
TBuilder
newQueryWithoutScopes()
Get a new query builder that doesn't have any global scopes.
TBuilder
newQueryWithoutScope(Scope|string $scope)
Get a new query instance without a given scope.
TBuilder
newQueryForRestoration(array|int $ids)
Get a new query to restore one or more models by their queueable IDs.
static TBuilder
on(string|null $connection = null)
Begin querying the model on a given connection.
static TBuilder
onWriteConnection()
Begin querying the model on the write connection.
static TBuilder
with(array|string $relations)
Begin querying a model with eager loading.