PHP Class Corcel\Comment

Inheritance: extends Model, use trait Corcel\Traits\CreatedAtTrait, use trait Corcel\Traits\UpdatedAtTrait
ファイルを表示 Open project: jgrossi/corcel

Protected Properties

Property Type Description
$dates
$primaryKey
$table

Public Methods

Method Description
findByPostId ( integer $postId ) : Comment Find a comment by post ID
hasReplies ( ) : boolean Verify if the current comment has replies
isApproved ( ) : boolean Verify if the current comment is approved
isReply ( ) : boolean Verify if the current comment is a reply from another comment
newQuery ( boolean $excludeDeleted = true ) : CommentBuilder Override the parent newQuery() to the custom CommentBuilder class
original ( ) : BelongsTo Original relationship
post ( ) : BelongsTo Post relationship
replies ( ) : Illuminate\Database\Eloquent\Relations\HasMany Replies relationship

Method Details

findByPostId() public static method

Find a comment by post ID
public static findByPostId ( integer $postId ) : Comment
$postId integer
return Comment

hasReplies() public method

Verify if the current comment has replies
public hasReplies ( ) : boolean
return boolean

isApproved() public method

Verify if the current comment is approved
public isApproved ( ) : boolean
return boolean

isReply() public method

Verify if the current comment is a reply from another comment
public isReply ( ) : boolean
return boolean

newQuery() public method

Override the parent newQuery() to the custom CommentBuilder class
public newQuery ( boolean $excludeDeleted = true ) : CommentBuilder
$excludeDeleted boolean
return CommentBuilder

original() public method

Original relationship
public original ( ) : BelongsTo
return Illuminate\Database\Eloquent\Relations\BelongsTo

post() public method

Post relationship
public post ( ) : BelongsTo
return Illuminate\Database\Eloquent\Relations\BelongsTo

replies() public method

Replies relationship
public replies ( ) : Illuminate\Database\Eloquent\Relations\HasMany
return Illuminate\Database\Eloquent\Relations\HasMany

Property Details

$dates protected_oe property

protected $dates

$primaryKey protected_oe property

protected $primaryKey

$table protected_oe property

protected $table