PHP 클래스 App\Repositories\CommentRepository

파일 보기 프로젝트 열기: forehalo/materialize-blog 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$model Model
$post model

공개 메소드들

메소드 설명
__construct ( Comment $comment, Post $post ) CommentRepository constructor.
all ( $n ) : mixed Get all comments.
destroy ( $id )
getById ( $id ) : mixed Get comment by given id.
store ( $input ) Store a new comment.
toggleStatus ( $id, $column, $value ) Toggle comment column status.

메소드 상세

__construct() 공개 메소드

CommentRepository constructor.
public __construct ( Comment $comment, Post $post )
$comment app\models\Comment
$post app\models\Post

all() 공개 메소드

Get all comments.
public all ( $n ) : mixed
$n
리턴 mixed

destroy() 공개 메소드

public destroy ( $id )

getById() 공개 메소드

Get comment by given id.
public getById ( $id ) : mixed
$id
리턴 mixed

store() 공개 메소드

Store a new comment.
public store ( $input )
$input

toggleStatus() 공개 메소드

Toggle comment column status.
public toggleStatus ( $id, $column, $value )
$id
$column
$value

프로퍼티 상세

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

Model
protected $model

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

model
protected $post