Documentation

Role extends Model

Table of Contents

ROLE_ADMIN  = 1
ROLE_MANAGER  = 2
ROLE_STORE  = 3
$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.
users()  : hasMany
Get the users that belong to this role.

Constants

ROLE_ADMIN

public mixed ROLE_ADMIN = 1

ROLE_MANAGER

public mixed ROLE_MANAGER = 2

ROLE_STORE

public mixed ROLE_STORE = 3

Properties

$casts

The attributes that should be cast.

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

$fillable

The attributes that are mass assignable.

protected array<string|int, mixed> $fillable = ['name']

$hidden

The attributes excluded from the model's JSON form.

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

$table

The table associated with the model.

protected string $table = "roles"

Methods

users()

Get the users that belong to this role.

public users() : hasMany
Return values
hasMany

Search results