메소드 |
설명 |
|
boot ( ) |
|
|
discussion ( ) : BelongsTo |
Define the relationship with the post's discussion. |
|
editUser ( ) : BelongsTo |
Define the relationship with the user who edited the post. |
|
getModels ( ) : array |
Get the type-to-model map. |
|
hideUser ( ) : BelongsTo |
Define the relationship with the user who hid the post. |
|
isVisibleTo ( User $user ) : boolean |
Determine whether or not this post is visible to the given user. |
|
newFromBuilder ( array $attributes = [], string | null $connection = null ) : static | object |
Create a new model instance according to the post's type. |
|
scopeAllTypes ( Builder $query ) : Builder |
Get all posts, regardless of their type, by removing the
RegisteredTypesScope global scope constraints applied on this model. |
|
setModel ( string $type, string $model ) : void |
Set the model for the given post type. |
|
user ( ) : BelongsTo |
Define the relationship with the post's author. |
|