PHP Class Learner\Http\Controllers\Admin\VideoController

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

Protected Properties

Property Type Description
$series Learner\Repositories\SeriesRepositoryInterface Series repository.
$videos Learner\Repositories\VideoRepositoryInterface Video repository.

Public Methods

Method Description
__construct ( Learner\Repositories\VideoRepositoryInterface $videos, Learner\Repositories\SeriesRepositoryInterface $series ) Instance video repository and series repository.
destory ( integer $id ) : Illuminate\Http\JsonResponse Delete a video
index ( ) : Illuminate\Http\JsonResponse Get all videos.
store ( ) : Illuminate\Http\JsonResponse Store a video.
update ( integer $id ) : Illuminate\Http\JsonResponse Update a video.

Protected Methods

Method Description
getResourceInfo ( string $type, integer $id ) : array Get video information from remote api. (vimeo. youtube. youku)

Method Details

__construct() public method

Instance video repository and series repository.
public __construct ( Learner\Repositories\VideoRepositoryInterface $videos, Learner\Repositories\SeriesRepositoryInterface $series )
$videos Learner\Repositories\VideoRepositoryInterface
$series Learner\Repositories\SeriesRepositoryInterface

destory() public method

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

getResourceInfo() protected method

Get video information from remote api. (vimeo. youtube. youku)
protected getResourceInfo ( string $type, integer $id ) : array
$type string
$id integer
return array

index() public method

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

store() public method

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

update() public method

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

Property Details

$series protected_oe property

Series repository.
protected SeriesRepositoryInterface,Learner\Repositories $series
return Learner\Repositories\SeriesRepositoryInterface

$videos protected_oe property

Video repository.
protected VideoRepositoryInterface,Learner\Repositories $videos
return Learner\Repositories\VideoRepositoryInterface