class Permission extends AbstractModel
Properties
bool | $timestamps | <p>Indicates if the model should be timestamped. Turn off by default.</p> | from AbstractModel |
|
protected callable[] | $afterSaveCallbacks | <p>An array of callbacks to be run once after the model is saved.</p> | from AbstractModel |
|
protected callable[] | $afterDeleteCallbacks | <p>An array of callbacks to be run once after the model is deleted.</p> | from AbstractModel |
|
static | $customRelations | from AbstractModel |
|
|
static | $customCasts | from AbstractModel |
|
|
static | $defaults | from AbstractModel |
|
|
protected string|null | $tableAlias | <p>An alias for the table name, used in queries.</p> | from AbstractModel |
|
int|null | $id | from AbstractModel |
|
|
protected | $table | <p>{@inheritdoc}</p> |
|
|
protected array | $dates | <p>The attributes that should be mutated to dates.</p> |
|
|
int | $group_id |
|
||
string | $permission |
|
Methods
<p>Get an attribute from the model. If nothing is found, attempt to load a custom relation method with this key.</p>
<p>Register a callback to be run once after the model is saved.</p>
<p>Register a callback to be run once after the model is deleted.</p>
Details
in AbstractModel
at
line 77
static
boot()
<p>{@inheritdoc}</p>
in AbstractModel
at
line 97
__construct(array $attributes = [])
<p>{@inheritdoc}</p>
in AbstractModel
at
line 115
getCasts()
<p>{@inheritdoc}</p>
in AbstractModel
at
line 133
mixed
getAttribute(string $key)
<p>Get an attribute from the model. If nothing is found, attempt to load a custom relation method with this key.</p>
in AbstractModel
at
line 159
protected mixed
getCustomRelation(string $name)
<p>Get a custom relation object.</p>
in AbstractModel
at
line 175
void
afterSave(callable $callback)
<p>Register a callback to be run once after the model is saved.</p>
in AbstractModel
at
line 186
void
afterDelete(callable $callback)
<p>Register a callback to be run once after the model is deleted.</p>
in AbstractModel
at
line 194
callable[]
releaseAfterSaveCallbacks()
in AbstractModel
at
line 206
callable[]
releaseAfterDeleteCallbacks()
in AbstractModel
at
line 218
__call($method, $arguments)
<p>{@inheritdoc}</p>
in AbstractModel
at
line 227
newModelQuery()
in AbstractModel
at
line 238
qualifyColumn($column)
in AbstractModel
at
line 247
withTableAlias(callable $callback)
in AbstractModel
at
line 262
newCollection(Collection|array $models = [])
at
line 38
BelongsTo
group()
<p>Define the relationship with the group that this permission is for.</p>
at
line 49
protected Builder
setKeysForSaveQuery(Builder $query)
<p>Set the keys for a save update query.</p>
at
line 62
static array[]
map()
<p>Get a map of permissions to the group IDs that have them.</p>