PHP Interface Learner\Repositories\UserRepositoryInterface

Mostrar archivo Open project: RryLee/learner.video Interface Usage Examples

Public Methods

Method Description
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.

Method Details

attachRole() public method

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

attachRoleById() public method

Give user one or more roles.
public attachRoleById ( integer $userId, array $roleIds ) : User
$userId integer
$roleIds array
return Learner\Models\User

create() public method

Create a new user in the database.
public create ( array $data ) : User
$data array
return Learner\Models\User

delete() public method

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

findAllActivePaginated() public method

Find all users paginated.
public findAllActivePaginated ( integer $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[]
$perPage integer
return Illuminate\Database\Eloquent\Collection | Learner\Models\User[]

findNotActivePaginated() public method

Find all not active users paginated.
public findNotActivePaginated ( integer $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[]
$perPage integer
return Illuminate\Database\Eloquent\Collection | Learner\Models\User[]

findTrashedPaginated() public method

Find all users in trash paginated.
public findTrashedPaginated ( $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | User[]
return Illuminate\Database\Eloquent\Collection | Learner\Models\User[]

findWithTrashedById() public method

Find user by id with trashed.
public findWithTrashedById ( integer $id ) : User
$id integer
return Learner\Models\User

getRegisterForm() public method

Get the user creation form service.
public getRegisterForm ( ) : Learner\Services\Forms\UserRegisterFormService.
return Learner\Services\Forms\UserRegisterFormService.

remove() public method

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

restore() public method

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

toggleActive() public method

Change user's status.
public toggleActive ( integer $id ) : boolean
$id integer
return boolean

update() public method

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