Snooze
extends Model
in package
implements
Entity
Uses
HasEntity, HasOwnerMorph, HasUserMorph, HasFactory
Class Snooze.
Tags
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'
PAGE
public
mixed
PAGE
= 'page'
Properties
$created_at
public
string
$created_at
$id
public
int
$id
$is_snooze_forever
public
int
$is_snooze_forever
$is_snoozed
public
bool
$is_snoozed
$is_system
public
bool
$is_system
$owner_id
public
int
$owner_id
$owner_type
public
string
$owner_type
$snooze_until
public
string
$snooze_until
$updated_at
public
string
$updated_at
$user_id
public
int
$user_id
$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
intentityType()
public
entityType() : string
Return values
stringexpired()
public
expired() : $this
Return values
$thisfactory()
public
static factory() : SnoozeFactory
Return values
SnoozeFactorygetOwnerAttribute()
public
getOwnerAttribute() : mixed
getOwnerEntityAttribute()
public
getOwnerEntityAttribute() : mixed
getTypes()
public
static getTypes() : array<string|int, string>
Return values
array<string|int, string>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
boolmoduleName()
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
stringscopeExpired()
Add scope to filter which snoozes are expired.
public
scopeExpired(Builder $query) : Builder
Parameters
- $query : Builder
Return values
BuilderscopeSubscription()
Add scope to filter which snoozes has subscription.
public
scopeSubscription(Builder $query) : Builder
Parameters
- $query : Builder
Return values
Buildersubscription()
public
subscription() : $this
Return values
$thisuser()
public
user() : MorphTo
Return values
MorphTouserEntity()
public
userEntity() : BelongsTo
Return values
BelongsTouserId()
public
userId() : int
Return values
intuserType()
public
userType() : string
Return values
stringnewFactory()
Create a new factory instance for the model.
protected
static newFactory() : Factory