PHP 클래스 BookStack\User

상속: extends Model, implements Illuminate\Contracts\Auth\Authenticatable, implements Illuminate\Contracts\Auth\CanResetPassword, use trait Illuminate\Auth\Authenticatable, use trait Illuminate\Auth\Passwords\CanResetPassword, use trait Illuminate\Notifications\Notifiable
파일 보기 프로젝트 열기: ssddanbrown/bookstack 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$fillable array The attributes that are mass assignable.
$hidden array The attributes excluded from the model's JSON form.
$permissions array This holds the user's permissions when loaded.
$table string The database table used by the model.

공개 메소드들

메소드 설명
attachRole ( Role $role ) Attach a role to this user.
attachRoleId ( $id ) Attach a role id to this user.
avatar ( ) : BelongsTo Get the avatar for the user.
can ( $permissionName ) : boolean Check if the user has a particular permission.
getAvatar ( integer $size = 50 ) : string Returns the user's avatar,
getDefault ( ) : User Returns the default public user.
getEditUrl ( ) : string Get the url for editing this user.
getProfileUrl ( ) : mixed Get the url that links to this user's profile.
getShortName ( integer $chars = 8 ) : string Get a shortened version of the user's name.
hasRole ( $role ) : mixed Check if the user has a role.
hasSocialAccount ( boolean | string $socialDriver = false ) : boolean Check if the user has a social account, If a driver is passed it checks for that single account type.
isDefault ( ) : boolean Check if the user is the default public user.
permissions ( boolean $cache = true ) : Illuminate\Database\Eloquent\Relations\HasManyThrough Get all permissions belonging to a the current user.
roles ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany The roles that belong to the user.
sendPasswordResetNotification ( string $token ) : void Send the password reset notification.
socialAccounts ( ) : Illuminate\Database\Eloquent\Relations\HasMany Get the social account associated with this user.

메소드 상세

attachRole() 공개 메소드

Attach a role to this user.
public attachRole ( Role $role )
$role Role

attachRoleId() 공개 메소드

Attach a role id to this user.
public attachRoleId ( $id )
$id

avatar() 공개 메소드

Get the avatar for the user.
public avatar ( ) : BelongsTo
리턴 Illuminate\Database\Eloquent\Relations\BelongsTo

can() 공개 메소드

Check if the user has a particular permission.
public can ( $permissionName ) : boolean
$permissionName
리턴 boolean

getAvatar() 공개 메소드

Returns the user's avatar,
public getAvatar ( integer $size = 50 ) : string
$size integer
리턴 string

getDefault() 공개 정적인 메소드

Returns the default public user.
public static getDefault ( ) : User
리턴 User

getEditUrl() 공개 메소드

Get the url for editing this user.
public getEditUrl ( ) : string
리턴 string

getProfileUrl() 공개 메소드

Get the url that links to this user's profile.
public getProfileUrl ( ) : mixed
리턴 mixed

getShortName() 공개 메소드

Get a shortened version of the user's name.
public getShortName ( integer $chars = 8 ) : string
$chars integer
리턴 string

hasRole() 공개 메소드

Check if the user has a role.
public hasRole ( $role ) : mixed
$role
리턴 mixed

hasSocialAccount() 공개 메소드

Check if the user has a social account, If a driver is passed it checks for that single account type.
public hasSocialAccount ( boolean | string $socialDriver = false ) : boolean
$socialDriver boolean | string
리턴 boolean

isDefault() 공개 메소드

Check if the user is the default public user.
public isDefault ( ) : boolean
리턴 boolean

permissions() 공개 메소드

Get all permissions belonging to a the current user.
public permissions ( boolean $cache = true ) : Illuminate\Database\Eloquent\Relations\HasManyThrough
$cache boolean
리턴 Illuminate\Database\Eloquent\Relations\HasManyThrough

roles() 공개 메소드

The roles that belong to the user.
public roles ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
리턴 Illuminate\Database\Eloquent\Relations\BelongsToMany

sendPasswordResetNotification() 공개 메소드

Send the password reset notification.
public sendPasswordResetNotification ( string $token ) : void
$token string
리턴 void

socialAccounts() 공개 메소드

Get the social account associated with this user.
public socialAccounts ( ) : Illuminate\Database\Eloquent\Relations\HasMany
리턴 Illuminate\Database\Eloquent\Relations\HasMany

프로퍼티 상세

$fillable 보호되어 있는 프로퍼티

The attributes that are mass assignable.
protected array $fillable
리턴 array

$hidden 보호되어 있는 프로퍼티

The attributes excluded from the model's JSON form.
protected array $hidden
리턴 array

$permissions 보호되어 있는 프로퍼티

This holds the user's permissions when loaded.
protected array $permissions
리턴 array

$table 보호되어 있는 프로퍼티

The database table used by the model.
protected string $table
리턴 string