PHP Класс Rinvex\Repository\Repositories\EloquentRepository

Наследование: extends BaseRepository
Показать файл Открыть проект

Открытые методы

Метод Описание
create ( array $attributes = [] ) : array Create a new entity with the given attributes.
createModel ( ) : Model Create a new repository model instance.
delete ( mixed $id ) : array Delete an entity with the given id.
find ( integer $id, array $attributes = ['*'] ) : Model Find an entity by it's primary key.
findAll ( array $attributes = ['*'] ) : Collection Find all entities.
findBy ( string $attribute, string $value, array $attributes = ['*'] ) : Model 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.
paginate ( integer | null $perPage = null, array $attributes = ['*'], string $pageName = 'page', integer | null $page = null ) : Illuminate\Contracts\Pagination\LengthAwarePaginator Paginate all entities.
simplePaginate ( integer | null $perPage = null, array $attributes = ['*'], string $pageName = 'page', integer | null $page = null ) : Illuminate\Contracts\Pagination\Paginator Paginate all entities into a simple paginator.
update ( mixed $id, array $attributes = [] ) : array Update an entity with the given attributes.

Описание методов

create() публичный Метод

Create a new entity with the given attributes.
public create ( array $attributes = [] ) : array
$attributes array
Результат array

createModel() публичный Метод

Create a new repository model instance.
public createModel ( ) : Model
Результат Illuminate\Database\Eloquent\Model

delete() публичный Метод

Delete an entity with the given id.
public delete ( mixed $id ) : array
$id mixed
Результат array

find() публичный Метод

Find an entity by it's primary key.
public find ( integer $id, array $attributes = ['*'] ) : Model
$id integer
$attributes array
Результат Illuminate\Database\Eloquent\Model

findAll() публичный Метод

Find all entities.
public findAll ( array $attributes = ['*'] ) : Collection
$attributes array
Результат Illuminate\Support\Collection

findBy() публичный Метод

Find an entity by one of it's attributes.
public findBy ( string $attribute, string $value, array $attributes = ['*'] ) : Model
$attribute string
$value string
$attributes array
Результат Illuminate\Database\Eloquent\Model

findWhere() публичный Метод

Find all entities matching where conditions.
public findWhere ( array $where, array $attributes = ['*'] ) : Collection
$where array
$attributes array
Результат Illuminate\Support\Collection

findWhereIn() публичный Метод

Find all entities matching whereIn conditions.
public findWhereIn ( array $where, array $attributes = ['*'] ) : Collection
$where array
$attributes array
Результат Illuminate\Support\Collection

findWhereNotIn() публичный Метод

Find all entities matching whereNotIn conditions.
public findWhereNotIn ( array $where, array $attributes = ['*'] ) : Collection
$where array
$attributes array
Результат Illuminate\Support\Collection

paginate() публичный Метод

Paginate all entities.
public paginate ( integer | null $perPage = null, array $attributes = ['*'], string $pageName = 'page', integer | null $page = null ) : Illuminate\Contracts\Pagination\LengthAwarePaginator
$perPage integer | null
$attributes array
$pageName string
$page integer | null
Результат Illuminate\Contracts\Pagination\LengthAwarePaginator

simplePaginate() публичный Метод

Paginate all entities into a simple paginator.
public simplePaginate ( integer | null $perPage = null, array $attributes = ['*'], string $pageName = 'page', integer | null $page = null ) : Illuminate\Contracts\Pagination\Paginator
$perPage integer | null
$attributes array
$pageName string
$page integer | null
Результат Illuminate\Contracts\Pagination\Paginator

update() публичный Метод

Update an entity with the given attributes.
public update ( mixed $id, array $attributes = [] ) : array
$id mixed
$attributes array
Результат array