Property | Type | Description | |
---|---|---|---|
$eagerLoad | array | The relationships that should be eager loaded. | |
$model | The model being queried. | ||
$passthru | array | The methods that should be returned from query builder. | |
$query | The base query builder instance. | ||
$total | array | Total count for paginate method. |
Method | Description | |
---|---|---|
__call ( string $method, array $parameters ) : mixed | Dynamically handle calls into the query instance. | |
__construct ( |
Create a new model query builder instance. | |
decrement ( string $column, integer $amount = 1, array $extra = [] ) : integer | Decrement a column's value by a given amount. | |
delete ( ) : integer | Delete a record from the database. | |
eagerLoadRelations ( array $models ) : array | Eager load the relationships for the models. | |
find ( mixed $id, array $columns = [] ) : |
Find a model by its primary key. | |
findOrFail ( mixed $id, array $columns = [] ) : |
Find a model by its primary key or throw an exception. | |
first ( array $columns = [] ) : |
Execute the query and get the first result. | |
firstOrFail ( array $columns = [] ) : |
Execute the query and get the first result or throw an exception. | |
forceDelete ( ) : integer | Force a delete on a set of soft deleted models. | |
get ( array $columns = [] ) : |
Execute the query as a "select" statement. | |
getEagerLoads ( ) : array | Get the relationships being eagerly loaded. | |
getModel ( ) : |
Get the model instance being queried. | |
getModels ( array $columns = [] ) : array | Get the hydrated models without eager loading. | |
getQuery ( ) : |
Get the underlying query builder instance. | |
getRelation ( string $relation ) : |
Get the relation instance for the given relation name. | |
increment ( string $column, integer $amount = 1, array $extra = [] ) : integer | Increment a column's value by a given amount. | |
onlyTrashed ( ) : |
Force the result set to only included soft deletes. | |
paginate ( integer $perPage = null, array $columns = [] ) : Illuminate\Pagination\Paginator | Get a paginator for the "select" statement. | |
pluck ( string $column ) : mixed | Pluck a single column from the database. | |
restore ( ) : integer | Restore the soft-deleted model instances. | |
setEagerLoads ( array $eagerLoad ) : void | Set the relationships being eagerly loaded. | |
setModel ( |
Set a model instance for the model being queried. | |
setQuery ( |
Set the underlying query builder instance. | |
update ( array $values ) : integer | Update a record in the database. | |
with ( $relations ) : |
Set the relationships that should be eager loaded. | |
withTrashed ( ) : LMongo\Eloquent\Builder | Include the soft deleted models in the results. |
Method | Description | |
---|---|---|
addUpdatedAtColumn ( array $values ) : array | Add the "updated at" column to an array of values. | |
isNested ( string $name, string $relation ) : boolean | Determine if the relationship is nested. | |
isSoftDeleteConstraint ( array $where, string $column ) : boolean | Determine if the given where clause is a soft delete constraint. | |
loadRelation ( array $models, $name, Closure $constraints ) : array | Eagerly load the relationship on a set of models. | |
nestedRelations ( string $relation ) : array | Get the deeply nested relations for a given top-level relation. | |
parseNested ( string $name, array $results ) : array | Parse the nested relationships in a relation. | |
parseRelations ( array $relations ) : array | Parse a list of relations into individuals. | |
softDelete ( ) : integer | Soft delete the record in the database. |
public __construct ( |
||
$query | ||
return | void |
protected addUpdatedAtColumn ( array $values ) : array | ||
$values | array | |
return | array |
public eagerLoadRelations ( array $models ) : array | ||
$models | array | |
return | array |
public findOrFail ( mixed $id, array $columns = [] ) : |
||
$id | mixed | |
$columns | array | |
return |
public firstOrFail ( array $columns = [] ) : |
||
$columns | array | |
return |
public forceDelete ( ) : integer | ||
return | integer |
public getEagerLoads ( ) : array | ||
return | array |
public getModel ( ) : |
||
return |
public getQuery ( ) : |
||
return |
public getRelation ( string $relation ) : |
||
$relation | string | |
return |
protected nestedRelations ( string $relation ) : array | ||
$relation | string | |
return | array |
public onlyTrashed ( ) : |
||
return |
protected parseRelations ( array $relations ) : array | ||
$relations | array | |
return | array |
public setEagerLoads ( array $eagerLoad ) : void | ||
$eagerLoad | array | |
return | void |
public setModel ( |
||
$model | ||
return |
protected softDelete ( ) : integer | ||
return | integer |
public with ( $relations ) : |
||
return |
public withTrashed ( ) : LMongo\Eloquent\Builder | ||
return | LMongo\Eloquent\Builder |
protected array $eagerLoad | ||
return | array |
protected Model,LMongo\Eloquent $model | ||
return |
protected array $passthru | ||
return | array |
protected Builder,LMongo\Eloquent $query | ||
return |