Метод |
Описание |
|
__call ( string $method, array $parameters ) : mixed |
Dynamically pass missing methods to the model. |
|
__callStatic ( $method, $parameters ) : mixed |
Dynamically pass missing static methods to the model. |
|
create ( array $attributes = [] ) : array |
Create a new entity with the given attributes. |
|
createModel ( ) : object |
Create a new repository model instance. |
|
delete ( mixed $id ) : array |
Delete an entity with the given id. |
|
find ( integer $id, array $attributes = ['*'] ) : object |
Find an entity by it's primary key. |
|
findAll ( array $attributes = ['*'] ) : Collection |
Find all entities. |
|
findBy ( string $attribute, string $value, array $attributes = ['*'] ) : object |
Find an entity by one of it's attributes. |
|
findWhere ( array $where, array $attributes = ['*'] ) : Collection |
Find all entities matching where conditions. |
|
findWhereIn ( array $where, array $attributes = ['*'] ) : Collection |
Find all entities matching whereIn conditions. |
|
findWhereNotIn ( array $where, array $attributes = ['*'] ) : Collection |
Find all entities matching whereNotIn conditions. |
|
getContainer ( string | null $service = null ) : object |
Get the IoC container instance or any of it's services. |
|
getModel ( ) : string |
Get the repository model. |
|
getRepositoryId ( ) : string |
Get the repository identifier. |
|
limit ( integer $limit ) |
Set the "limit" value of the query. |
|
offset ( integer $offset ) |
Set the "offset" value of the query. |
|
orderBy ( string $attribute, string $direction = 'asc' ) |
Add an "order by" clause to the query. |
|
paginate ( integer | null $perPage = null, array $attributes = ['*'], string $pageName = 'page', integer | null $page = null ) : Illuminate\Contracts\Pagination\LengthAwarePaginator |
Paginate all entities. |
|
setContainer ( Illuminate\Contracts\Container\Container $container ) |
Set the IoC container instance. |
|
setModel ( string $model ) |
Set the repository model. |
|
setRepositoryId ( string $repositoryId ) |
Set the repository identifier. |
|
simplePaginate ( integer | null $perPage = null, array $attributes = ['*'], string $pageName = 'page' ) : Illuminate\Contracts\Pagination\Paginator |
Paginate all entities into a simple paginator. |
|
update ( mixed $id, array $attributes = [] ) : array |
Update an entity with the given attributes. |
|
where ( string $attribute, string $operator = null, mixed $value = null, string $boolean = 'and' ) |
Add a basic where clause to the query. |
|
whereIn ( string $attribute, mixed $values, string $boolean = 'and', boolean $not = false ) |
Add a "where in" clause to the query. |
|
whereNotIn ( string $attribute, mixed $values, string $boolean = 'and' ) |
Add a "where not in" clause to the query. |
|
with ( array $relations ) |
Set the relationships that should be eager loaded. |
|