ReportItem
extends Model
in package
Uses
HasEntity, HasFactory, HasUserMorph, HasItemMorph
Class ReportItem.
Table of Contents
Constants
- ENTITY_TYPE = 'report_item'
Properties
- $created_at : string
- $feedback : string
- $id : int
- $ip_address : string
- $reason : ReportReason|null
- $reason_id : int
- $updated_at : string
- $fillable : array<string|int, string>
- $table : mixed
Methods
- entityId() : int
- entityType() : string
- getItemAttribute() : mixed
- getUserAttribute() : mixed
- getUserEntityAttribute() : mixed
- isUser() : bool
- check if $user is the user (creator) of entity.
- item() : MorphTo|null
- itemId() : int
- itemType() : string
- moduleName() : string
- reason() : HasOne
- user() : MorphTo
- userEntity() : BelongsTo
- userId() : int
- userType() : string
- newFactory() : ReportItemFactory
Constants
ENTITY_TYPE
public
mixed
ENTITY_TYPE
= 'report_item'
Properties
$created_at
public
string
$created_at
$feedback
public
string
$feedback
$id
public
int
$id
$ip_address
public
string
$ip_address
$reason
public
ReportReason|null
$reason
$reason_id
public
int
$reason_id
$updated_at
public
string
$updated_at
$fillable
protected
array<string|int, string>
$fillable
= ['user_id', 'user_type', 'item_id', 'item_type', 'reason_id', 'ip_address', 'feedback']
$table
protected
mixed
$table
= 'report_items'
Methods
entityId()
public
entityId() : int
Return values
intentityType()
public
entityType() : string
Return values
stringgetItemAttribute()
public
getItemAttribute() : mixed
getUserAttribute()
public
getUserAttribute() : mixed
getUserEntityAttribute()
public
getUserEntityAttribute() : mixed
isUser()
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
stringreason()
public
reason() : HasOne
Return values
HasOneuser()
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() : ReportItemFactory