PHP Class Learner\Repositories\Eloquent\SeriesRepository

Inheritance: extends AbstractRepository, implements Learner\Repositories\SeriesRepositoryInterface
Mostra file Open project: RryLee/learner.video

Protected Properties

Property Type Description
$relations array The seires relate models.

Public Methods

Method Description
__construct ( Series $series ) Create a new Series instance.
create ( array $data ) : array Create a new Series.
findAllWithRelation ( ) : Illuminate\Database\Eloquent\Collection | Series[] Return all series and relation.
findAllWithRelationBySlug ( $slug ) : Illuminate\Database\Eloquent\Collection | Series[] Return series and relation by slug. (video is published.)
findAllWithRelationHavePublishedVideo ( ) : Illuminate\Database\Eloquent\Collection | Series[] Return series and relation. (video is published.)
findAllWithRelationHavePublishedVideoLimit ( $limit = 4 ) : Illuminate\Database\Eloquent\Collection | Series[] Limit series and relation. (video is published.)
findImageById ( integer $id ) : string Find image path by id.
getCreateForm ( ) : Learner\Services\Forms\CreateSeriesFormService. Get the user creation form service.
getUpdateForm ( ) : Learner\Services\Forms\UpdateSeriesFormService. Get the user updation form service.
listIdAndTitle ( ) : Illuminate\Database\Eloquent\Collection List all series' id and title for categories list.
update ( integer $id, array $data ) : array Update Series by id.

Method Details

__construct() public method

Create a new Series instance.
public __construct ( Series $series )
$series Learner\Models\Series

create() public method

Create a new Series.
public create ( array $data ) : array
$data array
return array

findAllWithRelation() public method

Return all series and relation.
public findAllWithRelation ( ) : Illuminate\Database\Eloquent\Collection | Series[]
return Illuminate\Database\Eloquent\Collection | Learner\Models\Series[]

findAllWithRelationBySlug() public method

Return series and relation by slug. (video is published.)
public findAllWithRelationBySlug ( $slug ) : Illuminate\Database\Eloquent\Collection | Series[]
return Illuminate\Database\Eloquent\Collection | Learner\Models\Series[]

findAllWithRelationHavePublishedVideo() public method

Return series and relation. (video is published.)
public findAllWithRelationHavePublishedVideo ( ) : Illuminate\Database\Eloquent\Collection | Series[]
return Illuminate\Database\Eloquent\Collection | Learner\Models\Series[]

findAllWithRelationHavePublishedVideoLimit() public method

Limit series and relation. (video is published.)
public findAllWithRelationHavePublishedVideoLimit ( $limit = 4 ) : Illuminate\Database\Eloquent\Collection | Series[]
return Illuminate\Database\Eloquent\Collection | Learner\Models\Series[]

findImageById() public method

Find image path by id.
public findImageById ( integer $id ) : string
$id integer
return string

getCreateForm() public method

Get the user creation form service.
public getCreateForm ( ) : Learner\Services\Forms\CreateSeriesFormService.
return Learner\Services\Forms\CreateSeriesFormService.

getUpdateForm() public method

Get the user updation form service.
public getUpdateForm ( ) : Learner\Services\Forms\UpdateSeriesFormService.
return Learner\Services\Forms\UpdateSeriesFormService.

listIdAndTitle() public method

List all series' id and title for categories list.
public listIdAndTitle ( ) : Illuminate\Database\Eloquent\Collection
return Illuminate\Database\Eloquent\Collection

update() public method

Update Series by id.
public update ( integer $id, array $data ) : array
$id integer
$data array
return array

Property Details

$relations protected_oe static_oe property

The seires relate models.
protected static array $relations
return array