PHP 클래스 Corcel\Comment

상속: extends Model, use trait Corcel\Traits\CreatedAtTrait, use trait Corcel\Traits\UpdatedAtTrait
파일 보기 프로젝트 열기: jgrossi/corcel

보호된 프로퍼티들

프로퍼티 타입 설명
$dates
$primaryKey
$table

공개 메소드들

메소드 설명
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

메소드 상세

findByPostId() 공개 정적인 메소드

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

hasReplies() 공개 메소드

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

isApproved() 공개 메소드

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

isReply() 공개 메소드

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

newQuery() 공개 메소드

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

original() 공개 메소드

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

post() 공개 메소드

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

replies() 공개 메소드

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

프로퍼티 상세

$dates 보호되어 있는 프로퍼티

protected $dates

$primaryKey 보호되어 있는 프로퍼티

protected $primaryKey

$table 보호되어 있는 프로퍼티

protected $table