MetaFox

Search extends Model
in package
implements Entity Uses HasEntity, HasFactory, HasUserMorph, HasOwnerMorph, HasItemMorph

Class Search.

Tags
mixin

Builder

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

$item_type

public string $item_type

$owner_type

public string $owner_type

$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
int

entityType()

public entityType() : string
Return values
string

factory()

public static factory(mixed $parameters) : SearchFactory
Parameters
$parameters : mixed
Return values
SearchFactory

getOwnerEntityAttribute()

public getOwnerEntityAttribute() : mixed

getUserEntityAttribute()

public getUserEntityAttribute() : mixed

isOwner()

check if $user is the owner of entity.

public isOwner(User $user) : bool
Parameters
$user : User
Return values
bool

isUser()

check if $user is the user (creator) of entity.

public isUser(User $user) : bool
Parameters
$user : User
Return values
bool

item()

public item() : MorphTo|null
Return values
MorphTo|null

itemType()

public itemType() : string
Return values
string

moduleName()

public moduleName() : string
Return values
string

ownerEntity()

public ownerEntity() : BelongsTo
Return values
BelongsTo

ownerType()

public ownerType() : string
Return values
string

privacyStreams()

public privacyStreams() : HasMany
Return values
HasMany

scopeTerms()

public scopeTerms(mixed $query, string $term) : mixed
Parameters
$query : mixed
$term : string

tagData()

public tagData() : BelongsToMany
Return values
BelongsToMany

terms()

public terms(string $string) : self
Parameters
$string : string
Return values
self

userEntity()

public userEntity() : BelongsTo
Return values
BelongsTo

userType()

public userType() : string
Return values
string

newFactory()

protected static newFactory() : SearchFactory
Return values
SearchFactory

fullTextWildcards()

private fullTextWildcards(string $term) : string
Parameters
$term : string
Return values
string

        
On this page

Search results