Properties
| Namespace | Modules\Categories\Models |
| Classname | Category |
| Extends | App\Models\Model |
| Uses | Modules\Users\Traits\Authorable, Modules\Cache\Traits\Cacheable, Modules\Fields\Traits\HasFields, Modules\Users\Traits\Permissible, Modules\Kernel\Traits\RepositoryBridge, Modules\Router\Traits\Routable, Modules\Seo\Traits\Seoable |
| Table | categories |
Makeup
Attributes
group_id
parent_id
name
handle
description
fields
uri
routePattern
Observers
Relationships
Methods
Observers
deleting
During the deleting model event, the associated children categories are also removed from the database.
Relationships
categorizable()
The Category model exposes itself as a polymorphic relatable model via MorphTo.
group()
The Category model has a BelongsTo relationship with the Group model.
parent()
The Category model can have a BelongsTo relationship with the Category model (itself).
children()
The Category model can have a HasMany relationship with the Category model (itself).
Methods
path()
Returns the uri attribute.