Property | Type | Description | |
---|---|---|---|
$relations | array | The user relate models. |
Method | Description | |
---|---|---|
__construct ( |
Create a new User instance. | |
attachRole ( |
attach a role to user. | |
attachRoleById ( integer $userId, array $roleIds ) : |
Give user one or more roles. | |
create ( array $data ) : |
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 | |
Find all active users paginated. | |
findNotActivePaginated ( integer $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | |
Find all not active users paginated. | |
findTrashedPaginated ( $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | |
Find all users in trash paginated. | |
findWithTrashedById ( integer $id ) : |
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. |
public __construct ( |
||
$user |
public attachRole ( |
||
$user | ||
$roleOrRoleId | mixed |
public attachRoleById ( integer $userId, array $roleIds ) : |
||
$userId | integer | |
$roleIds | array | |
return |
public findAllActivePaginated ( integer $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | |
||
$perPage | integer | |
return | Illuminate\Database\Eloquent\Collection | |
public findNotActivePaginated ( integer $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | |
||
$perPage | integer | |
return | Illuminate\Database\Eloquent\Collection | |
public findTrashedPaginated ( $perPage = 50 ) : Illuminate\Database\Eloquent\Collection | |
||
return | Illuminate\Database\Eloquent\Collection | |
public findWithTrashedById ( integer $id ) : |
||
$id | integer | |
return |
public getRegisterForm ( ) : Learner\Services\Forms\UserRegisterFormService. | ||
return | Learner\Services\Forms\UserRegisterFormService. |
public toggleActive ( integer $id ) : boolean | ||
$id | integer | |
return | boolean |
protected static array $relations | ||
return | array |