class Permission extends AbstractModel
Properties
bool | $timestamps | Indicates if the model should be timestamped. Turn off by default. | from AbstractModel |
|
protected callable[] | $afterSaveCallbacks | An array of callbacks to be run once after the model is saved. | from AbstractModel |
|
protected callable[] | $afterDeleteCallbacks | An array of callbacks to be run once after the model is deleted. | from AbstractModel |
|
static | $customRelations | from AbstractModel |
|
|
static | $dateAttributes | from AbstractModel |
|
|
static | $defaults | from AbstractModel |
|
|
protected | $table | {@inheritdoc} |
|
|
int | $group_id |
|
||
string | $permission |
|
Methods
Get an attribute from the model. If nothing is found, attempt to load a custom relation method with this key.
Register a callback to be run once after the model is saved.
Register a callback to be run once after the model is deleted.
Details
in AbstractModel
at
line 56
static
boot()
{@inheritdoc}
in AbstractModel
at
line 76
__construct(array $attributes = [])
{@inheritdoc}
in AbstractModel
at
line 96
array
getDates()
Get the attributes that should be converted to dates.
in AbstractModel
at
line 114
mixed
getAttribute(string $key)
Get an attribute from the model. If nothing is found, attempt to load a custom relation method with this key.
in AbstractModel
at
line 140
protected mixed
getCustomRelation(string $name)
Get a custom relation object.
in AbstractModel
at
line 156
void
afterSave(callable $callback)
Register a callback to be run once after the model is saved.
in AbstractModel
at
line 167
void
afterDelete(callable $callback)
Register a callback to be run once after the model is deleted.
in AbstractModel
at
line 175
callable[]
releaseAfterSaveCallbacks()
in AbstractModel
at
line 187
callable[]
releaseAfterDeleteCallbacks()
in AbstractModel
at
line 199
__call($method, $arguments)
{@inheritdoc}
at
line 31
BelongsTo
group()
Define the relationship with the group that this permission is for.
at
line 42
protected Builder
setKeysForSaveQuery(Builder $query)
Set the keys for a save update query.
at
line 55
static array[]
map()
Get a map of permissions to the group IDs that have them.