Feed
extends Model
in package
implements
Content, HasPrivacy, HasTotalView, HasTotalShare, HasTotalLike, HasTotalCommentWithReply, HasItemMorph, HasSponsor, HasHashTag, HasGlobalSearch, HasSavedItem
Uses
HasContent, HasAmountsTrait, HasUserMorph, HasOwnerMorph, HasItemMorph, HasFactory, HasHashTagTrait, AppendPrivacyListTrait
Class Feed.
Tags
Table of Contents
Interfaces
- Content
- Interface Content.
- HasPrivacy
- Interface HasPrivacy.
- HasTotalView
- Interface HasTotalView.
- HasTotalShare
- Interface HasTotalLike.
- HasTotalLike
- Interface HasTotalLike.
- HasTotalCommentWithReply
- Interface HasTotalComment.
- HasItemMorph
- HasSponsor
- Interface HasSponsor.
- HasHashTag
- Interface Entity.
- HasGlobalSearch
- Interface HasGlobalSearch.
- HasSavedItem
- Interface HasSavedItem.
Constants
- ENTITY_TYPE = 'feed'
- FROM_APP_RESOURCE = 'app'
- FROM_FEED_RESOURCE = 'feed'
- IMPORT_ENTITY_TYPE = 'activity_feed'
- TO_LINK_REVIEW = '/settings/review'
Properties
- $content : string|null
- $created_at : string|Carbon
- $feed_reference : int
- $from_resource : string
- $id : int
- $is_approved : int
- $is_hide : int
- $parent_feed_id : int
- $parent_module_id : int
- $privacy : int
- $privacy_id : int
- $privacy_list : array<string|int, int>
- $status : string
- $stream : array<string|int, Stream>|null
- $total_share : int
- $total_view : int
- $type_id : string
- $updated_at : string|Carbon
- $appends : array<string|int, string>
- $casts : mixed
- $fillable : mixed
- $table : mixed
Methods
- __toString() : mixed
- buildSeoData() : array<string, mixed>
- decrementAmount() : int
- decrementTotalItem() : void
- deletePrivacyStreams() : void
- Delete {item}_privacy_streams.
- disableFeedSponsor() : void
- disableSponsor() : void
- enableFeedSponsor() : void
- enableSponsor() : void
- getIsApprovedAttribute() : bool
- getIsHideAttribute() : bool
- getItemAttribute() : mixed
- getKeepCommentItemRouterAttribute() : bool
- getOwnerAttribute() : mixed
- getOwnerEntityAttribute() : mixed
- getOwnerPendingMessage() : string|null
- getPrivacyListAttribute() : array<string|int, mixed>|null
- getThumbnail() : string|null
- getUserAttribute() : mixed
- getUserEntityAttribute() : mixed
- hiddenFeeds() : BelongsToMany
- history() : HasMany
- incrementAmount() : int
- incrementTotalItem() : void
- incrementTotalView() : void
- isApproved() : bool
- isDraft() : mixed
- isOwner() : bool
- check if $user is the owner of entity.
- isOwnerPending() : bool
- isPublished() : mixed
- isSponsored() : bool
- isSponsoredInFeed() : bool
- isUser() : bool
- check if $user is the user (creator) of entity.
- item() : MorphTo|null
- itemId() : int
- itemType() : string
- likes() : MorphMany
- loadPrivacyListAttribute() : mixed
- owner() : MorphTo
- ownerEntity() : BelongsTo
- ownerId() : int
- ownerType() : string
- pinned() : HasMany
- pinnedFeeds() : BelongsToMany
- privacyItem() : mixed
- reactItem() : self
- Get indicate item handle privacy logic.
- setIsApprovedAttribute() : void
- setPrivacyListAttribute() : mixed
- shares() : MorphMany
- stream() : HasMany
- streamPending() : bool
- syncPrivacyStreams() : void
- Create {item}_privacy_streams.
- tagData() : BelongsToMany
- toApprovedNotification() : array<string|int, mixed>
- toDetailLink() : string|null
- toDetailUrl() : string|null
- toLink() : string|null
- toOGDescription() : string|null
- toOGImages() : array<int, mixed>
- toPendingNotification() : array<string|int, mixed>|null
- toRouter() : string|null
- toSavedItem() : array<string, mixed>
- [title, image, item_type_name, total_photo, user(UserEntity), link].
- toSearchable() : array<string|int, mixed>|null
- toSitemapUrl() : string|null
- toSponsorData() : array<string|int, mixed>|null
- toTitle() : string
- toUrl() : string|null
- user() : MorphTo
- userEntity() : BelongsTo
- userId() : int
- userType() : string
- handleNegativeNumber() : void
- isDenied() : Attribute
- isPending() : Attribute
- isRemoved() : Attribute
- newFactory() : FeedFactory
- toPendingPreview() : string|null
Constants
ENTITY_TYPE
public
mixed
ENTITY_TYPE
= 'feed'
FROM_APP_RESOURCE
public
mixed
FROM_APP_RESOURCE
= 'app'
FROM_FEED_RESOURCE
public
mixed
FROM_FEED_RESOURCE
= 'feed'
IMPORT_ENTITY_TYPE
public
mixed
IMPORT_ENTITY_TYPE
= 'activity_feed'
TO_LINK_REVIEW
public
mixed
TO_LINK_REVIEW
= '/settings/review'
Properties
$content
public
string|null
$content
$created_at
public
string|Carbon
$created_at
$feed_reference
public
int
$feed_reference
$from_resource
public
string
$from_resource
$id
public
int
$id
$is_approved
public
int
$is_approved
$is_hide
public
int
$is_hide
- not autoload.
$parent_feed_id
public
int
$parent_feed_id
$parent_module_id
public
int
$parent_module_id
$privacy
public
int
$privacy
$privacy_id
public
int
$privacy_id
$privacy_list
public
array<string|int, int>
$privacy_list
$status
public
string
$status
$stream
public
array<string|int, Stream>|null
$stream
$total_share
public
int
$total_share
$total_view
public
int
$total_view
$type_id
public
string
$type_id
- action type in activity_types
$updated_at
public
string|Carbon
$updated_at
$appends
protected
array<string|int, string>
$appends
= []
$casts
protected
mixed
$casts
= ['is_sponsor' => 'boolean']
$fillable
protected
mixed
$fillable
= ['privacy', 'user_id', 'user_type', 'owner_id', 'owner_type', 'item_id', 'item_type', 'type_id', 'feed_reference', 'parent_feed_id', 'parent_module_id', 'content', 'total_like', 'total_comment', 'total_reply', 'total_view', 'total_share', 'is_sponsor', 'updated_at', 'status', 'from_resource']
$table
protected
mixed
$table
= 'activity_feeds'
Methods
__toString()
public
__toString() : mixed
buildSeoData()
public
buildSeoData(string $resolution, string $nameOrUrl, string $type, int $id) : array<string, mixed>
Parameters
- $resolution : string
- $nameOrUrl : string
- $type : string
- $id : int
Tags
Return values
array<string, mixed>decrementAmount()
public
decrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
- $column : string
- $amount : int = 1
Return values
intdecrementTotalItem()
public
decrementTotalItem() : void
deletePrivacyStreams()
Delete {item}_privacy_streams.
public
deletePrivacyStreams() : void
disableFeedSponsor()
public
disableFeedSponsor() : void
disableSponsor()
public
disableSponsor() : void
enableFeedSponsor()
public
enableFeedSponsor() : void
enableSponsor()
public
enableSponsor() : void
getIsApprovedAttribute()
public
getIsApprovedAttribute() : bool
Return values
boolgetIsHideAttribute()
public
getIsHideAttribute() : bool
Return values
boolgetItemAttribute()
public
getItemAttribute() : mixed
getKeepCommentItemRouterAttribute()
public
getKeepCommentItemRouterAttribute() : bool
Return values
boolgetOwnerAttribute()
public
getOwnerAttribute() : mixed
getOwnerEntityAttribute()
public
getOwnerEntityAttribute() : mixed
getOwnerPendingMessage()
public
getOwnerPendingMessage() : string|null
Return values
string|nullgetPrivacyListAttribute()
public
getPrivacyListAttribute() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetThumbnail()
public
getThumbnail() : string|null
Return values
string|nullgetUserAttribute()
public
getUserAttribute() : mixed
getUserEntityAttribute()
public
getUserEntityAttribute() : mixed
hiddenFeeds()
public
hiddenFeeds() : BelongsToMany
Return values
BelongsToManyhistory()
public
history() : HasMany
Return values
HasManyincrementAmount()
public
incrementAmount(string $column[, int $amount = 1 ]) : int
Parameters
- $column : string
- $amount : int = 1
Return values
intincrementTotalItem()
public
incrementTotalItem() : void
incrementTotalView()
public
incrementTotalView() : void
isApproved()
public
isApproved() : bool
Return values
boolisDraft()
public
isDraft() : mixed
isOwner()
check if $user is the owner of entity.
public
isOwner(User $user) : bool
Parameters
- $user : User
Return values
boolisOwnerPending()
public
isOwnerPending() : bool
Return values
boolisPublished()
public
isPublished() : mixed
isSponsored()
public
isSponsored() : bool
Return values
boolisSponsoredInFeed()
public
isSponsoredInFeed() : bool
Return values
boolisUser()
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
stringlikes()
public
likes() : MorphMany
Return values
MorphManyloadPrivacyListAttribute()
public
loadPrivacyListAttribute() : mixed
owner()
public
owner() : MorphTo
Return values
MorphToownerEntity()
public
ownerEntity() : BelongsTo
Return values
BelongsToownerId()
public
ownerId() : int
Return values
intownerType()
public
ownerType() : string
Return values
stringpinned()
public
pinned() : HasMany
Return values
HasManypinnedFeeds()
public
pinnedFeeds() : BelongsToMany
Return values
BelongsToManyprivacyItem()
public
privacyItem() : mixed
reactItem()
Get indicate item handle privacy logic.
public
reactItem() : self
Return values
selfsetIsApprovedAttribute()
public
setIsApprovedAttribute(bool $value) : void
Parameters
- $value : bool
setPrivacyListAttribute()
public
setPrivacyListAttribute([array<string|int, mixed> $privacyList = [] ]) : mixed
Parameters
- $privacyList : array<string|int, mixed> = []
shares()
public
shares() : MorphMany
Return values
MorphManystream()
public
stream() : HasMany
Return values
HasManystreamPending()
public
streamPending() : bool
Return values
boolsyncPrivacyStreams()
Create {item}_privacy_streams.
public
syncPrivacyStreams(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
tagData()
public
tagData() : BelongsToMany
Return values
BelongsToManytoApprovedNotification()
public
toApprovedNotification() : array<string|int, mixed>
Return values
array<string|int, mixed>toDetailLink()
public
toDetailLink() : string|null
Return values
string|nulltoDetailUrl()
public
toDetailUrl() : string|null
Return values
string|nulltoLink()
public
toLink() : string|null
Tags
Return values
string|nulltoOGDescription()
public
toOGDescription([User|null $context = null ]) : string|null
Parameters
- $context : User|null = null
Return values
string|nulltoOGImages()
public
toOGImages() : array<int, mixed>
Return values
array<int, mixed>toPendingNotification()
public
toPendingNotification() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nulltoRouter()
public
toRouter() : string|null
Tags
Return values
string|nulltoSavedItem()
[title, image, item_type_name, total_photo, user(UserEntity), link].
public
toSavedItem() : array<string, mixed>
Return values
array<string, mixed>toSearchable()
public
toSearchable() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nulltoSitemapUrl()
public
toSitemapUrl() : string|null
Return values
string|nulltoSponsorData()
public
toSponsorData() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nulltoTitle()
public
toTitle() : string
Return values
stringtoUrl()
public
toUrl() : string|null
Tags
Return values
string|nulluser()
public
user() : MorphTo
Return values
MorphTouserEntity()
public
userEntity() : BelongsTo
Return values
BelongsTouserId()
public
userId() : int
Return values
intuserType()
public
userType() : string
Return values
stringhandleNegativeNumber()
protected
handleNegativeNumber(string $column) : void
Parameters
- $column : string
isDenied()
protected
isDenied() : Attribute
Return values
AttributeisPending()
protected
isPending() : Attribute
Return values
AttributeisRemoved()
protected
isRemoved() : Attribute
Return values
AttributenewFactory()
protected
static newFactory() : FeedFactory
Return values
FeedFactorytoPendingPreview()
protected
toPendingPreview() : string|null