PHP Class Owl\Repositories\Eloquent\CommentRepository

Inheritance: implements Owl\Repositories\CommentRepositoryInterface
显示文件 Open project: owl/owl

Protected Properties

Property Type Description
$comment

Public Methods

Method Description
__construct ( Comment $comment )
createComment ( $cmt ) : Illuminate\Database\Eloquent\Model Create a new comment.
deleteComment ( $id ) : boolean Delete a comment.
getCommentById ( $id ) : Illuminate\Database\Eloquent\Model Get a comment by comment id.
updateComment ( $id, $body ) : Illuminate\Database\Eloquent\Model Update a comment's body.

Method Details

__construct() public method

public __construct ( Comment $comment )
$comment Owl\Repositories\Eloquent\Models\Comment

createComment() public method

Create a new comment.
public createComment ( $cmt ) : Illuminate\Database\Eloquent\Model
return Illuminate\Database\Eloquent\Model

deleteComment() public method

Delete a comment.
public deleteComment ( $id ) : boolean
$id int
return boolean

getCommentById() public method

Get a comment by comment id.
public getCommentById ( $id ) : Illuminate\Database\Eloquent\Model
$id int
return Illuminate\Database\Eloquent\Model

updateComment() public method

Update a comment's body.
public updateComment ( $id, $body ) : Illuminate\Database\Eloquent\Model
$id int
$body string
return Illuminate\Database\Eloquent\Model

Property Details

$comment protected_oe property

protected $comment