Search
        
        extends Model
    
    
            
            in package
            
        
    
            
            implements
                            Entity                    
    
            
            Uses
                            HasEntity,                             HasFactory,                             HasUserMorph,                             HasOwnerMorph,                             HasItemMorph                    
    
Class Search.
Tags
Table of Contents
Interfaces
- Entity
 - Interface Entity.
 
Constants
- ENTITY_TYPE = 'search'
 
Properties
- $created_at : string
 - $id : int
 - $item_id : int
 - $item_type : string
 - $owner_id : int
 - $owner_type : string
 - $privacy : int
 - $text : string
 - $title : string
 - $user_id : int
 - $user_type : string
 - $fillable : array<string|int, string>
 - $table : mixed
 
Methods
- entityId() : int
 - entityType() : string
 - factory() : SearchFactory
 - getItemAttribute() : mixed
 - getOwnerAttribute() : mixed
 - getOwnerEntityAttribute() : mixed
 - getUserAttribute() : mixed
 - getUserEntityAttribute() : mixed
 - isOwner() : bool
 - check if $user is the owner of entity.
 - isUser() : bool
 - check if $user is the user (creator) of entity.
 - item() : MorphTo|null
 - itemId() : int
 - itemType() : string
 - moduleName() : string
 - owner() : MorphTo
 - ownerEntity() : BelongsTo
 - ownerId() : int
 - ownerType() : string
 - privacyStreams() : HasMany
 - scopeTerms() : mixed
 - tagData() : BelongsToMany
 - terms() : self
 - user() : MorphTo
 - userEntity() : BelongsTo
 - userId() : int
 - userType() : string
 - newFactory() : SearchFactory
 - fullTextWildcards() : string
 
Constants
ENTITY_TYPE
    public
        mixed
    ENTITY_TYPE
    = 'search'
    
    
    
Properties
$created_at
    public
        string
    $created_at
    
    
    
    
$id
    public
        int
    $id
    
    
    
    
$item_id
    public
        int
    $item_id
    
    
    
    
$item_type
    public
        string
    $item_type
    
    
    
    
$owner_id
    public
        int
    $owner_id
    
    
    
    
$owner_type
    public
        string
    $owner_type
    
    
    
    
$privacy
    public
        int
    $privacy
    
    
    
    
$text
    public
        string
    $text
    
    
    
    
$title
    public
        string
    $title
    
    
    
    
$user_id
    public
        int
    $user_id
    
    
    
    
$user_type
    public
        string
    $user_type
    
    
    
    
$fillable
    protected
        array<string|int, string>
    $fillable
     = ['item_id', 'item_type', 'user_id', 'user_type', 'owner_id', 'owner_type', 'title', 'text', 'privacy', 'created_at']
    
    
    
$table
    protected
        mixed
    $table
     = 'search_items'
    
    
    
Methods
entityId()
    public
                    entityId() : int
    Return values
intentityType()
    public
                    entityType() : string
    Return values
stringfactory()
    public
            static        factory(mixed $parameters) : SearchFactory
    Parameters
- $parameters : mixed
 
Return values
SearchFactorygetItemAttribute()
    public
                    getItemAttribute() : mixed
    getOwnerAttribute()
    public
                    getOwnerAttribute() : mixed
    getOwnerEntityAttribute()
    public
                    getOwnerEntityAttribute() : mixed
    getUserAttribute()
    public
                    getUserAttribute() : mixed
    getUserEntityAttribute()
    public
                    getUserEntityAttribute() : mixed
    isOwner()
check if $user is the owner of entity.
    public
                    isOwner(User $user) : bool
    Parameters
- $user : User
 
Return values
boolisUser()
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
stringowner()
    public
                    owner() : MorphTo
    Return values
MorphToownerEntity()
    public
                    ownerEntity() : BelongsTo
    Return values
BelongsToownerId()
    public
                    ownerId() : int
    Return values
intownerType()
    public
                    ownerType() : string
    Return values
stringprivacyStreams()
    public
                    privacyStreams() : HasMany
    Return values
HasManyscopeTerms()
    public
                    scopeTerms(mixed $query, string $term) : mixed
    Parameters
- $query : mixed
 - $term : string
 
tagData()
    public
                    tagData() : BelongsToMany
    Return values
BelongsToManyterms()
    public
                    terms(string $string) : self
    Parameters
- $string : string
 
Return values
selfuser()
    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() : SearchFactory
    Return values
SearchFactoryfullTextWildcards()
    private
                    fullTextWildcards(string $term) : string
    Parameters
- $term : string