Documentation

User extends User Uses HasApiTokens, HasFactory, Notifiable, SoftDeletes

Table of Contents

$casts  : array<string|int, mixed>
The attributes that should be cast to native types.
$dates  : array<string|int, mixed>
Column for soft deletes
$fillable  : array<string|int, mixed>
The attributes that are mass assignable.
$guarded  : array<string|int, mixed>
The attributes that are not mass assignable.
$hidden  : array<string|int, mixed>
The attributes that should be hidden for arrays.
$table  : string
The table associated with the model.
$with  : array<string|int, mixed>
The extra attributes that should be showed for arrays.
agencies()  : mixed
Get the agencies of the item.
canRead()  : mixed
Confirm read permissions
canWrite()  : mixed
Confirm write permissions
generateToken()  : mixed
isAdmin()  : mixed
Confirm that user are admin
isManager()  : mixed
Confirm that user are admin
modules()  : mixed
Get the modules of the item.
type()  : mixed
Get the user type of the item.
upgradePermissions()  : void
upgradePermissionsForAllUsers()  : void

Properties

$casts

The attributes that should be cast to native types.

protected array<string|int, mixed> $casts = ['email_verified_at' => 'datetime']

$dates

Column for soft deletes

protected array<string|int, mixed> $dates = ['deleted_at']

$fillable

The attributes that are mass assignable.

protected array<string|int, mixed> $fillable = ['name', 'lastname', 'initials', 'email', 'password', 'user_type_id', 'language']

$guarded

The attributes that are not mass assignable.

protected array<string|int, mixed> $guarded = ['id', 'created_at', 'updated_at', 'deleted_at']

$hidden

The attributes that should be hidden for arrays.

protected array<string|int, mixed> $hidden = ['pivot', 'user_type_id', 'email_verified_at', 'password', 'remember_token', 'created_at', 'updated_at', 'deleted_at']

$table

The table associated with the model.

protected string $table = 'users'

$with

The extra attributes that should be showed for arrays.

protected array<string|int, mixed> $with = ['type']

Methods

agencies()

Get the agencies of the item.

public agencies() : mixed
Return values
mixed

canRead()

Confirm read permissions

public canRead(mixed $value[, mixed $isGroup = false ]) : mixed
Parameters
$value : mixed
$isGroup : mixed = false
Return values
mixed

canWrite()

Confirm write permissions

public canWrite(mixed $value[, mixed $isGroup = false ]) : mixed
Parameters
$value : mixed
$isGroup : mixed = false
Return values
mixed

generateToken()

public generateToken() : mixed
Return values
mixed

isAdmin()

Confirm that user are admin

public isAdmin() : mixed
Return values
mixed

isManager()

Confirm that user are admin

public isManager() : mixed
Return values
mixed

modules()

Get the modules of the item.

public modules() : mixed
Return values
mixed

type()

Get the user type of the item.

public type() : mixed
Return values
mixed

upgradePermissions()

public upgradePermissions() : void
Tags
desc

Update user permissions

Return values
void

upgradePermissionsForAllUsers()

public static upgradePermissionsForAllUsers() : void
Tags
desc

Update all permissions for all users

Return values
void

Search results