User extends Model implements Authenticatable, Authorizable, JWTSubject Uses HasFactory, Authenticatable, Authorizable, SoftDeletes
Interfaces, Classes and Traits
- Authenticatable
- Authorizable
- JWTSubject
Table of Contents
- $appends : array<string|int, mixed>
- The accessors to append to the model's array form.
- $casts : array<string|int, mixed>
- The attributes that should be cast.
- $fillable : array<string|int, mixed>
- The attributes that are mass assignable.
- $hidden : array<string|int, mixed>
- The attributes excluded from the model's JSON form.
- $table : string
- The table associated with the model.
- customer() : HasOne
- Get the customer relationship
- deletePicture() : true
- employee() : HasOne
- Get the employee relationship
- generateEmailVerificationToken() : string
- getGenderAttribute() : mixed
- Get the gender for user if employee.
- getJWTCustomClaims() : array<string|int, mixed>
- Return a key value array, containing any custom claims to be added to the JWT.
- getJWTIdentifier() : mixed
- Get the identifier that will be stored in the subject claim of the JWT.
- getPictureAttribute() : void
- Get the picture's url for user.
- getRoleAttribute() : string
- Get the role
- hasVerifiedEmail() : bool
- isAdmin() : bool
- Verifies user is admin
- logs() : belongsToMany
- Get all the logs that have this user.
- markEmailAsVerified() : void
- redsys() : HasOne
- role() : BelongsTo
- Get the role relationship
- savePicture() : true
- setPasswordAttribute() : void
- Set a hashed password to the attribute
- store() : HasOne
- Get the store relationship
- getAttachmentPath() : string
Properties
$appends
The accessors to append to the model's array form.
protected
array<string|int, mixed>
$appends
= ['picture', 'role']
$casts
The attributes that should be cast.
protected
array<string|int, mixed>
$casts
= ['phone' => 'string', 'name' => 'string', 'email' => 'string', 'is_employee' => 'boolean', 'email_verified_at' => 'datetime']
$fillable
The attributes that are mass assignable.
protected
array<string|int, mixed>
$fillable
= ['name', 'email', 'phone', 'picture_path', 'is_employee', 'firebase_device_token', 'flavor', 'last_login', 'is_accepted_policy']
$hidden
The attributes excluded from the model's JSON form.
protected
array<string|int, mixed>
$hidden
= ['role_id', 'picture_path', 'password', 'updated_at', 'created_at', 'deleted_at', 'email_verification_token']
$table
The table associated with the model.
protected
string
$table
= "users"
Methods
customer()
Get the customer relationship
public
customer() : HasOne
Return values
HasOne —deletePicture()
public
deletePicture() : true
Tags
Return values
true —employee()
Get the employee relationship
public
employee() : HasOne
Return values
HasOne —generateEmailVerificationToken()
public
generateEmailVerificationToken() : string
Return values
string —getGenderAttribute()
Get the gender for user if employee.
public
getGenderAttribute() : mixed
Return values
mixed —getJWTCustomClaims()
Return a key value array, containing any custom claims to be added to the JWT.
public
getJWTCustomClaims() : array<string|int, mixed>
Return values
array<string|int, mixed> —getJWTIdentifier()
Get the identifier that will be stored in the subject claim of the JWT.
public
getJWTIdentifier() : mixed
Return values
mixed —getPictureAttribute()
Get the picture's url for user.
public
getPictureAttribute() : void
Return values
void —getRoleAttribute()
Get the role
public
getRoleAttribute() : string
Return values
string —hasVerifiedEmail()
public
hasVerifiedEmail() : bool
Return values
bool —isAdmin()
Verifies user is admin
public
isAdmin() : bool
Return values
bool —logs()
Get all the logs that have this user.
public
logs() : belongsToMany
Return values
belongsToMany —markEmailAsVerified()
public
markEmailAsVerified() : void
Return values
void —redsys()
public
redsys() : HasOne
Return values
HasOne —role()
Get the role relationship
public
role() : BelongsTo
Return values
BelongsTo —savePicture()
public
savePicture( $file) : true
Parameters
Tags
Return values
true —setPasswordAttribute()
Set a hashed password to the attribute
public
setPasswordAttribute(string $password) : void
Parameters
- $password : string
Return values
void —store()
Get the store relationship
public
store() : HasOne
Return values
HasOne —getAttachmentPath()
private
getAttachmentPath() : string