PHP Interface Learner\Repositories\BlogRepositoryInterface

Afficher le fichier Open project: RryLee/learner.video Interface Usage Examples

Méthodes publiques

Méthode Description
create ( array $data ) Create new blog.
delete ( integer $id ) : boolean Delete a blog.
findAllPublishedPaginated ( $perPage = 10 ) : Illuminate\Contracts\Pagination\LengthAwarePaginator Paginate all published blogs.
findAllWithRelation ( ) : Illuminate\Database\Eloquent\Collection | Blog[] Find all blog with category.
findPublishedById ( integer $id ) : Illuminate\Database\Eloquent\Collection | Blog[] Get published blog by id.
getCreateForm ( ) : CreateBlogFormService Get save blog form.
getUpdateForm ( ) : UpdateBlogFormService Get update blog form.
togglePublished ( integer $id ) : boolean Change blog's published status.
toggleTop ( integer $id ) : boolean Change blog's toped status.
update ( $id, array $data ) Update new blog.

Method Details

create() public méthode

Create new blog.
public create ( array $data )
$data array

delete() public méthode

Delete a blog.
public delete ( integer $id ) : boolean
$id integer
Résultat boolean

findAllPublishedPaginated() public méthode

Paginate all published blogs.
public findAllPublishedPaginated ( $perPage = 10 ) : Illuminate\Contracts\Pagination\LengthAwarePaginator
Résultat Illuminate\Contracts\Pagination\LengthAwarePaginator

findAllWithRelation() public méthode

Find all blog with category.
public findAllWithRelation ( ) : Illuminate\Database\Eloquent\Collection | Blog[]
Résultat Illuminate\Database\Eloquent\Collection | Learner\Models\Blog[]

findPublishedById() public méthode

Get published blog by id.
public findPublishedById ( integer $id ) : Illuminate\Database\Eloquent\Collection | Blog[]
$id integer
Résultat Illuminate\Database\Eloquent\Collection | Learner\Models\Blog[]

getCreateForm() public méthode

Get save blog form.
public getCreateForm ( ) : CreateBlogFormService
Résultat Learner\Services\Forms\CreateBlogFormService

getUpdateForm() public méthode

Get update blog form.
public getUpdateForm ( ) : UpdateBlogFormService
Résultat Learner\Services\Forms\UpdateBlogFormService

togglePublished() public méthode

Change blog's published status.
public togglePublished ( integer $id ) : boolean
$id integer
Résultat boolean

toggleTop() public méthode

Change blog's toped status.
public toggleTop ( integer $id ) : boolean
$id integer
Résultat boolean

update() public méthode

Update new blog.
public update ( $id, array $data )
$data array