PHP Class App\Repositories\CommentRepository

Afficher le fichier Open project: forehalo/materialize-blog Class Usage Examples

Protected Properties

Свойство Type Description
$model Model
$post model

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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

all() public méthode

Get all comments.
public all ( $n ) : mixed
$n
Résultat mixed

destroy() public méthode

public destroy ( $id )

getById() public méthode

Get comment by given id.
public getById ( $id ) : mixed
$id
Résultat mixed

store() public méthode

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

toggleStatus() public méthode

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

Property Details

$model protected_oe property

Model
protected $model

$post protected_oe property

model
protected $post