PHP Class App\Repositories\CategoryRepository

Exibir arquivo Open project: forehalo/materialize-blog Class Usage Examples

Protected Properties

Property Type Description
$model app\models\Category Category Model object.

Public Methods

Method Description
__construct ( Category $category ) CategoryRepository constructor.
all ( ) : mixed Get all Categories.
getById ( $id ) Get by category id.

Method Details

__construct() public method

CategoryRepository constructor.
public __construct ( Category $category )
$category app\models\Category

all() public method

Get all Categories.
public all ( ) : mixed
return mixed

getById() public method

Get by category id.
public getById ( $id )
$id

Property Details

$model protected_oe property

Category Model object.
protected Category,App\Models $model
return app\models\Category