Свойство | Тип | Описание | |
---|---|---|---|
$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. |
Метод | Описание | |
---|---|---|
__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. |
Метод | Описание | |
---|---|---|
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 | ||
Результат | void |
protected addUpdatedAtColumn ( array $values ) : array | ||
$values | array | |
Результат | array |
public eagerLoadRelations ( array $models ) : array | ||
$models | array | |
Результат | array |
public findOrFail ( mixed $id, array $columns = [] ) : |
||
$id | mixed | |
$columns | array | |
Результат |
public firstOrFail ( array $columns = [] ) : |
||
$columns | array | |
Результат |
public forceDelete ( ) : integer | ||
Результат | integer |
public getEagerLoads ( ) : array | ||
Результат | array |
public getModel ( ) : |
||
Результат |
public getQuery ( ) : |
||
Результат |
public getRelation ( string $relation ) : |
||
$relation | string | |
Результат |
protected nestedRelations ( string $relation ) : array | ||
$relation | string | |
Результат | array |
public onlyTrashed ( ) : |
||
Результат |
protected parseRelations ( array $relations ) : array | ||
$relations | array | |
Результат | array |
public setEagerLoads ( array $eagerLoad ) : void | ||
$eagerLoad | array | |
Результат | void |
public setModel ( |
||
$model | ||
Результат |
protected softDelete ( ) : integer | ||
Результат | integer |
public with ( $relations ) : |
||
Результат |
public withTrashed ( ) : LMongo\Eloquent\Builder | ||
Результат | LMongo\Eloquent\Builder |
protected array $eagerLoad | ||
Результат | array |
protected Model,LMongo\Eloquent $model | ||
Результат |
protected array $passthru | ||
Результат | array |
protected Builder,LMongo\Eloquent $query | ||
Результат |