PHP Class App\Repositories\Recipe\EloquentRecipe

Inheritance: extends app\repositories\AbstractEloquentRepository, implements RecipeInterface
Show file Open project: ngmy/webloyer Class Usage Examples

Public Methods

Method Description
__construct ( Model $recipe ) : void Create a new repository instance.
byPage ( integer $page = 1, integer $limit = 10 ) : Illuminate\Pagination\LengthAwarePaginator Get paginated recipes.

Method Details

__construct() public method

Create a new repository instance.
public __construct ( Model $recipe ) : void
$recipe Illuminate\Database\Eloquent\Model
return void

byPage() public method

Get paginated recipes.
public byPage ( integer $page = 1, integer $limit = 10 ) : Illuminate\Pagination\LengthAwarePaginator
$page integer Page number
$limit integer Number of recipes per page
return Illuminate\Pagination\LengthAwarePaginator