PHP Интерфейс Learner\Repositories\UserRepositoryInterface

Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
attachRole ( User $user, mixed $roleOrRoleId ) Attach a role to user.
attachRoleById ( integer $userId, array $roleIds ) : User Give user one or more roles.
create ( array $data ) : User Create a new user in the database.
delete ( integer $id ) Delete user from database and remove avatar.
findAllActivePaginated ( integer $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[] Find all users paginated.
findNotActivePaginated ( integer $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[] Find all not active users paginated.
findTrashedPaginated ( $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[] Find all users in trash paginated.
findWithTrashedById ( integer $id ) : User Find user by id with trashed.
getRegisterForm ( ) : Learner\Services\Forms\UserRegisterFormService. Get the user creation form service.
remove ( integer $id ) Remove the user to trash.
restore ( integer $id ) Restore a user from trash.
toggleActive ( integer $id ) : boolean Change user's status.
update ( integer $id, array $attributes ) Update user.

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

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

Attach a role to user.
public attachRole ( User $user, mixed $roleOrRoleId )
$user Learner\Models\User
$roleOrRoleId mixed

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

Give user one or more roles.
public attachRoleById ( integer $userId, array $roleIds ) : User
$userId integer
$roleIds array
Результат Learner\Models\User

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

Create a new user in the database.
public create ( array $data ) : User
$data array
Результат Learner\Models\User

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

Delete user from database and remove avatar.
public delete ( integer $id )
$id integer

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

Find all users paginated.
public findAllActivePaginated ( integer $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[]
$perPage integer
Результат Illuminate\Database\Eloquent\Collection | Learner\Models\User[]

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

Find all not active users paginated.
public findNotActivePaginated ( integer $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[]
$perPage integer
Результат Illuminate\Database\Eloquent\Collection | Learner\Models\User[]

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

Find all users in trash paginated.
public findTrashedPaginated ( $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[]
Результат Illuminate\Database\Eloquent\Collection | Learner\Models\User[]

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

Find user by id with trashed.
public findWithTrashedById ( integer $id ) : User
$id integer
Результат Learner\Models\User

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

Get the user creation form service.
public getRegisterForm ( ) : Learner\Services\Forms\UserRegisterFormService.
Результат Learner\Services\Forms\UserRegisterFormService.

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

Remove the user to trash.
public remove ( integer $id )
$id integer

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

Restore a user from trash.
public restore ( integer $id )
$id integer

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

Change user's status.
public toggleActive ( integer $id ) : boolean
$id integer
Результат boolean

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

Update user.
public update ( integer $id, array $attributes )
$id integer
$attributes array