class Taxonomy extends Model (View source)

Traits

Methods to manage permissions on a model.

Properties

static protected $unguarded from  Model
PermissionCollection read-only $permissions from  HasPermissions

Methods

getConnectionName()

No description

from  Model
static void
bootHasPermissions()

No description

MorphMany
permissions()

Relationship with the permission records pertaining to this model.

array
abilities()

No description

array
defaultAbilities()

No description

void
savePermissions(array|null $grid)

Save the permissions to the database.

bool
isPublic(string $ability = 'view')

No description

static array|null
allPermitted(User|null $user, string $ability = 'view')

Get the model IDs that the given user has permission for.

static void
booted()

No description

HasMany
tags()

No description

Attribute
editUrl()

No description

Details

getConnectionName()

No description

static void bootHasPermissions()

No description

Return Value

void

MorphMany permissions()

Relationship with the permission records pertaining to this model.

Return Value

MorphMany

array abilities()

No description

Return Value

array

array defaultAbilities()

No description

Return Value

array

void savePermissions(array|null $grid)

Save the permissions to the database.

Parameters

array|null $grid

Return Value

void

bool isPublic(string $ability = 'view')

No description

Parameters

string $ability

Return Value

bool

static array|null allPermitted(User|null $user, string $ability = 'view')

Get the model IDs that the given user has permission for.

If the user is an admin, the result will be null, meaning there is no restriction on the models they have permission for.

Parameters

User|null $user
string $ability

Return Value

array|null

static protected void booted()

No description

Return Value

void

HasMany tags()

No description

Return Value

HasMany

protected Attribute editUrl()

No description

Return Value

Attribute