forked from sword-jin/learner.video
-
Notifications
You must be signed in to change notification settings - Fork 0
/
VideoController.php
40 lines (34 loc) · 837 Bytes
/
VideoController.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
namespace Learner\Http\Controllers;
use Learner\Http\Controllers\BaseController;
use Learner\Repositories\VideoRepositoryInterface;
class VideoController extends BaseController
{
/**
* Video Repository.
*
* @var \Learner\Repositories\VideoRepositoryInterface
*/
protected $videos;
/**
* Instance video repository.
*
* @param \Learner\Repositories\VideoRepositoryInterface $videos
*/
public function __construct(VideoRepositoryInterface $videos)
{
$this->videos = $videos;
}
/**
* Get video by paginator.
*
* /videos get
*
* @return \Illuminate\View\View
*/
public function index()
{
$videos = $this->videos->findAllPublishedPaginated(20);
return view('videos.index', compact('videos'));
}
}