PHP Class Learner\Http\Controllers\Admin\BlogController

Inheritance: extends BaseController
Exibir arquivo Open project: RryLee/learner.video

Protected Properties

Property Type Description
$blogs Learner\Repositories\BlogRepositoryInterface Blog repository.

Public Methods

Method Description
__construct ( Learner\Repositories\BlogRepositoryInterface $blogs ) Instance blog repository.
destory ( integer $id ) : Illuminate\Http\JsonResponse Delete a video.
edit ( integer $id ) : Illuminate\Http\JsonResponse Edit the blog.
index ( ) : Illuminate\Http\JsonResponse Get all blogs with relation.
store ( ) : Illuminate\Http\JsonResponse Save created blog.
togglePublished ( integer $id ) : Illuminate\Http\JsonResponse Toggle blog published.
toggleTop ( integer $id ) : Illuminate\Http\JsonResponse Toggle blog toped.
update ( integer $id ) : Illuminate\Http\JsonResponse Update the blog.

Method Details

__construct() public method

Instance blog repository.
public __construct ( Learner\Repositories\BlogRepositoryInterface $blogs )
$blogs Learner\Repositories\BlogRepositoryInterface

destory() public method

admin/blogs/{id} delete
public destory ( integer $id ) : Illuminate\Http\JsonResponse
$id integer
return Illuminate\Http\JsonResponse

edit() public method

admin/blogs/{id} get
public edit ( integer $id ) : Illuminate\Http\JsonResponse
$id integer
return Illuminate\Http\JsonResponse

index() public method

admin/blogs get
public index ( ) : Illuminate\Http\JsonResponse
return Illuminate\Http\JsonResponse

store() public method

admin/blogs post
public store ( ) : Illuminate\Http\JsonResponse
return Illuminate\Http\JsonResponse

togglePublished() public method

admin/blogs/togglePublished/{id} put
public togglePublished ( integer $id ) : Illuminate\Http\JsonResponse
$id integer
return Illuminate\Http\JsonResponse

toggleTop() public method

admin/blogs/toggleTop/{id} put
public toggleTop ( integer $id ) : Illuminate\Http\JsonResponse
$id integer
return Illuminate\Http\JsonResponse

update() public method

admin/blogs/{id} put
public update ( integer $id ) : Illuminate\Http\JsonResponse
$id integer
return Illuminate\Http\JsonResponse

Property Details

$blogs protected_oe property

Blog repository.
protected BlogRepositoryInterface,Learner\Repositories $blogs
return Learner\Repositories\BlogRepositoryInterface