class Role extends Model

A role of a user. Users have one global role and can have many project- specific roles.

Traits

Some models have fixed, "constant" instances. An example is the Role model, which may have e.g. the roles "admin" and "user". These are always the same and do not change.

HasFactory

Constants

INSTANCES

The constant instances of this model.

Properties

bool $timestamps

Don't maintain timestamps for this model.

Methods

static mixed
__callStatic(string $key, mixed $arguments)

Get one of the instances of this model that are defined in the INSTANCES constant array.

static Role
admin()

No description

static int
adminId()

No description

static Role
expert()

No description

static int
expertId()

No description

static Role
editor()

No description

static int
editorId()

No description

static Role
guest()

No description

static int
guestId()

No description

Details

static mixed __callStatic(string $key, mixed $arguments)

Get one of the instances of this model that are defined in the INSTANCES constant array.

Parameters

string $key

Can be he instance name like "myName" or to get the instance ID "myNameId".

mixed $arguments

Return Value

mixed

at line 22
static Role admin()

No description

Return Value

Role

at line 22
static int adminId()

No description

Return Value

int

at line 22
static Role expert()

No description

Return Value

Role

at line 22
static int expertId()

No description

Return Value

int

at line 22
static Role editor()

No description

Return Value

Role

at line 22
static int editorId()

No description

Return Value

int

at line 22
static Role guest()

No description

Return Value

Role

at line 22
static int guestId()

No description

Return Value

int