MetaFox

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

Class Snooze.

Tags
mixin

Builder

Table of Contents

Interfaces

Entity
Interface Entity.

Constants

ENTITY_TYPE  = 'activity_snooze'
FRIEND  = 'friend'
GROUP  = 'group'
PAGE  = 'page'

Properties

$created_at  : string
$id  : int
$is_snooze_forever  : int
$is_snoozed  : bool
$is_system  : bool
$owner_id  : int
$owner_type  : string
$snooze_until  : string
$updated_at  : string
$user_id  : int
$user_type  : string
$fillable  : mixed
$table  : mixed

Methods

entityId()  : int
entityType()  : string
expired()  : $this
factory()  : SnoozeFactory
getOwnerAttribute()  : mixed
getOwnerEntityAttribute()  : mixed
getTypes()  : array<string|int, string>
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.
moduleName()  : string
owner()  : MorphTo
ownerEntity()  : BelongsTo
ownerId()  : int
ownerType()  : string
scopeExpired()  : Builder
Add scope to filter which snoozes are expired.
scopeSubscription()  : Builder
Add scope to filter which snoozes has subscription.
subscription()  : $this
user()  : MorphTo
userEntity()  : BelongsTo
userId()  : int
userType()  : string
newFactory()  : Factory
Create a new factory instance for the model.

Constants

ENTITY_TYPE

public mixed ENTITY_TYPE = 'activity_snooze'

FRIEND

public mixed FRIEND = 'friend'

GROUP

public mixed GROUP = 'group'

Properties

$created_at

public string $created_at

$is_snooze_forever

public int $is_snooze_forever

$is_snoozed

public bool $is_snoozed

$is_system

public bool $is_system

$owner_type

public string $owner_type

$snooze_until

public string $snooze_until

$updated_at

public string $updated_at

$user_type

public string $user_type

$fillable

protected mixed $fillable = ['user_id', 'user_type', 'owner_id', 'owner_type', 'is_system', 'is_snoozed', 'snooze_until', 'is_snooze_forever']

$table

protected mixed $table = 'activity_snoozes'

Methods

entityId()

public entityId() : int
Return values
int

entityType()

public entityType() : string
Return values
string

expired()

public expired() : $this
Return values
$this

factory()

public static factory() : SnoozeFactory
Return values
SnoozeFactory

getOwnerEntityAttribute()

public getOwnerEntityAttribute() : mixed

getTypes()

public static getTypes() : array<string|int, string>
Return values
array<string|int, string>

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

moduleName()

public moduleName() : string
Return values
string

ownerEntity()

public ownerEntity() : BelongsTo
Return values
BelongsTo

ownerType()

public ownerType() : string
Return values
string

scopeExpired()

Add scope to filter which snoozes are expired.

public scopeExpired(Builder $query) : Builder
Parameters
$query : Builder
Return values
Builder

scopeSubscription()

Add scope to filter which snoozes has subscription.

public scopeSubscription(Builder $query) : Builder
Parameters
$query : Builder
Return values
Builder

subscription()

public subscription() : $this
Return values
$this

userEntity()

public userEntity() : BelongsTo
Return values
BelongsTo

userType()

public userType() : string
Return values
string

newFactory()

Create a new factory instance for the model.

protected static newFactory() : Factory
Return values
Factory

        
On this page

Search results