UserShortcut
        
        extends Model
    
    
            
            in package
            
        
    
            
            implements
                            Entity                    
    
            
            Uses
                            HasEntity,                             HasFactory,                             HasUserMorph,                             HasItemMorph                    
    
Class UserShortcut.
Tags
Table of Contents
Interfaces
- Entity
 - Interface Entity.
 
Constants
- ENTITY_TYPE = 'shortcut'
 - SORT_DEFAULT = 1
 - SORT_HIDE = 0
 - SORT_PIN = 2
 
Properties
- $id : int
 - $sort_type : int
 - $fillable : array<string|int, string>
 - $table : mixed
 
Methods
- entityId() : int
 - entityType() : string
 - factory() : UserShortcutFactory
 - getItemAttribute() : mixed
 - getUserAttribute() : mixed
 - getUserEntityAttribute() : mixed
 - isUser() : bool
 - check if $user is the user (creator) of entity.
 - item() : MorphTo|null
 - itemId() : int
 - itemType() : string
 - moduleName() : string
 - toLink() : mixed
 - user() : MorphTo
 - userEntity() : BelongsTo
 - userId() : int
 - userType() : string
 - newFactory() : UserShortcutFactory
 
Constants
ENTITY_TYPE
    public
        mixed
    ENTITY_TYPE
    = 'shortcut'
    
    
    
SORT_DEFAULT
    public
        mixed
    SORT_DEFAULT
    = 1
    
    
    
SORT_HIDE
    public
        mixed
    SORT_HIDE
    = 0
    
    
    
SORT_PIN
    public
        mixed
    SORT_PIN
    = 2
    
    
    
Properties
$id
    public
        int
    $id
    
    
    
    
$sort_type
    public
        int
    $sort_type
    
    
    
    
$fillable
    protected
        array<string|int, string>
    $fillable
     = ['user_id', 'user_type', 'item_id', 'item_type', 'sort_type', 'updated_at']
    
    
    
$table
    protected
        mixed
    $table
     = 'user_shortcuts'
    
    
    
Methods
entityId()
    public
                    entityId() : int
    Return values
intentityType()
    public
                    entityType() : string
    Return values
stringfactory()
    public
            static        factory(mixed $parameters) : UserShortcutFactory
    Parameters
- $parameters : mixed
 
Return values
UserShortcutFactorygetItemAttribute()
    public
                    getItemAttribute() : mixed
    getUserAttribute()
    public
                    getUserAttribute() : mixed
    getUserEntityAttribute()
    public
                    getUserEntityAttribute() : mixed
    isUser()
check if $user is the user (creator) of entity.
    public
                    isUser(User $user) : bool
    Parameters
- $user : User
 
Return values
boolitem()
    public
                    item() : MorphTo|null
    Return values
MorphTo|nullitemId()
    public
                    itemId() : int
    Return values
intitemType()
    public
                    itemType() : string
    Return values
stringmoduleName()
    public
                    moduleName() : string
    Return values
stringtoLink()
    public
                    toLink() : mixed
    user()
    public
                    user() : MorphTo
    Return values
MorphTouserEntity()
    public
                    userEntity() : BelongsTo
    Return values
BelongsTouserId()
    public
                    userId() : int
    Return values
intuserType()
    public
                    userType() : string
    Return values
stringnewFactory()
    protected
            static        newFactory() : UserShortcutFactory