Category
        
        extends Model
    
    
            
            in package
            
        
    
            
            implements
                            Entity,                             HasTotalItem,                             HasSubCategory                    
    
            
            Uses
                            HasEntity,                             HasFactory,                             HasAmountsTrait,                             SoftDeletes,                             TranslatableCategory                    
    
Class Category.
Tags
Table of Contents
Interfaces
- Entity
 - Interface Entity.
 - HasTotalItem
 - Interface Entity.
 - HasSubCategory
 
Constants
- ENTITY_TYPE = 'photo_category'
 - IS_ACTIVE = 1
 
Properties
- $created_at : string
 - $id : int
 - $is_active : bool
 - $is_default : bool
 - $level : int
 - $name : string
 - $name_url : string
 - $ordering : int
 - $parent_id : int
 - $parentCategory : Category
 - $subCategories : Category
 - $total_item : int
 - $updated_at : string
 - $fillable : mixed
 - $table : mixed
 
Methods
- decrementAmount() : int
 - decrementTotalItem() : void
 - entityId() : int
 - entityType() : string
 - factory() : CategoryFactory
 - getAdminBrowseUrlAttribute() : string
 - getIsDefaultAttribute() : bool
 - getTitleAttribute() : mixed
 - incrementAmount() : int
 - incrementTotalItem() : void
 - incrementTotalView() : void
 - moduleName() : string
 - parentCategory() : BelongsTo
 - photos() : BelongsToMany
 - subCategories() : HasMany
 - toLink() : string|null
 - toSubCategoriesLink() : string
 - toSubCategoriesUrl() : string
 - toUrl() : string|null
 - handleNegativeNumber() : void
 - newFactory() : CategoryFactory
 
Constants
ENTITY_TYPE
    public
        mixed
    ENTITY_TYPE
    = 'photo_category'
    
    
    
IS_ACTIVE
    public
        mixed
    IS_ACTIVE
    = 1
    
    
    
Properties
$created_at
    public
        string
    $created_at
    
    
    
    
$id
    public
        int
    $id
    
    
    
    
$is_active
    public
        bool
    $is_active
    
    
    
    
$is_default
    public
        bool
    $is_default
    
    
    
    
$level
    public
        int
    $level
    
    
    
    
$name
    public
        string
    $name
    
    
    
    
$name_url
    public
        string
    $name_url
    
    
    
    
$ordering
    public
        int
    $ordering
    
    
    
    
$parent_id
    public
        int
    $parent_id
    
    
    
    
$parentCategory
    public
        Category
    $parentCategory
    
    
    
    
$subCategories
    public
        Category
    $subCategories
    
    
    
    
$total_item
    public
        int
    $total_item
    
    
    
    
$updated_at
    public
        string
    $updated_at
    
    
    
    
$fillable
    protected
        mixed
    $fillable
     = ['parent_id', 'name', 'name_url', 'is_active', 'ordering', 'total_item', 'level', 'created_at', 'updated_at']
    
    
    
$table
    protected
        mixed
    $table
     = 'photo_categories'
    
    
    
Methods
decrementAmount()
    public
                    decrementAmount(string $column[, int $amount = 1 ]) : int
    Parameters
- $column : string
 - $amount : int = 1
 
Return values
intdecrementTotalItem()
    public
                    decrementTotalItem() : void
    entityId()
    public
                    entityId() : int
    Return values
intentityType()
    public
                    entityType() : string
    Return values
stringfactory()
    public
            static        factory() : CategoryFactory
    Return values
CategoryFactorygetAdminBrowseUrlAttribute()
    public
                    getAdminBrowseUrlAttribute() : string
    Return values
stringgetIsDefaultAttribute()
    public
                    getIsDefaultAttribute() : bool
    Return values
boolgetTitleAttribute()
    public
                    getTitleAttribute() : mixed
    incrementAmount()
    public
                    incrementAmount(string $column[, int $amount = 1 ]) : int
    Parameters
- $column : string
 - $amount : int = 1
 
Return values
intincrementTotalItem()
    public
                    incrementTotalItem() : void
    incrementTotalView()
    public
                    incrementTotalView() : void
    moduleName()
    public
                    moduleName() : string
    Return values
stringparentCategory()
    public
                    parentCategory() : BelongsTo
    Return values
BelongsTophotos()
    public
                    photos() : BelongsToMany
    Return values
BelongsToManysubCategories()
    public
                    subCategories() : HasMany
    Return values
HasManytoLink()
    public
                    toLink() : string|null
    Return values
string|nulltoSubCategoriesLink()
    public
                    toSubCategoriesLink() : string
    Return values
stringtoSubCategoriesUrl()
    public
                    toSubCategoriesUrl() : string
    Return values
stringtoUrl()
    public
                    toUrl() : string|null
    Return values
string|nullhandleNegativeNumber()
    protected
                    handleNegativeNumber(string $column) : void
    Parameters
- $column : string
 
newFactory()
    protected
            static        newFactory() : CategoryFactory