PHP Class Owl\Repositories\Fluent\CommentRepository

Inheritance: extends AbstractFluent, implements Owl\Repositories\CommentRepositoryInterface
Show file Open project: owl/owl

Protected Properties

Property Type Description
$table

Public Methods

Method Description
createComment ( $comment ) : 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.
getCommentUserById ( $id ) : Illuminate\Database\Eloquent\Model Get a comment user by comment id.
getTableName ( ) : string Get a table name.
updateComment ( $id, $body ) : Illuminate\Database\Eloquent\Model Update a comment's body.

Method Details

createComment() public method

Create a new comment.
public createComment ( $comment ) : Illuminate\Database\Eloquent\Model
$comment object item_id, user_id, body, username, email
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

getCommentUserById() public method

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

getTableName() public method

Get a table name.
public getTableName ( ) : string
return string

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

$table protected property

protected $table