MetaFox

UserBan extends Model
in package
Uses HasEntity, HasFactory, HasUserMorph, HasOwnerMorph

Class UserBan.

Table of Contents

Constants

ENTITY_TYPE  = 'user_ban'

Properties

$created_at  : string
$end_time_stamp  : int
$id  : int
$reason  : string
$return_user_group  : int
$start_time_stamp  : int
$updated_at  : string
$fillable  : array<string|int, string>
$table  : mixed

Methods

entityId()  : int
entityType()  : string
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.
moduleName()  : string
owner()  : MorphTo
ownerEntity()  : BelongsTo
ownerId()  : int
ownerType()  : string
user()  : MorphTo
userEntity()  : BelongsTo
userId()  : int
userType()  : string
newFactory()  : UserBanFactory
Create a new factory instance for the model.

Constants

ENTITY_TYPE

public mixed ENTITY_TYPE = 'user_ban'

Properties

$created_at

public string $created_at

$end_time_stamp

public int $end_time_stamp

$return_user_group

public int $return_user_group

$start_time_stamp

public int $start_time_stamp

$updated_at

public string $updated_at

$fillable

protected array<string|int, string> $fillable = ['user_id', 'user_type', 'ban_id', 'owner_id', 'owner_type', 'start_time_stamp', 'end_time_stamp', 'return_user_group', 'reason']

$table

protected mixed $table = 'user_ban'

Methods

entityId()

public entityId() : int
Return values
int

entityType()

public entityType() : string
Return values
string

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

moduleName()

public moduleName() : string
Return values
string

ownerEntity()

public ownerEntity() : BelongsTo
Return values
BelongsTo

ownerType()

public ownerType() : string
Return values
string

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() : UserBanFactory
Return values
UserBanFactory

        
On this page

Search results