forked from endachao/site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HomeController.php
49 lines (41 loc) · 920 Bytes
/
HomeController.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
41
42
43
44
45
46
47
48
49
<?php
namespace App\Http\Controllers;
use App\Repositories\TrickRepositoryInterface;
class HomeController extends BaseController
{
/**
* Trick repository.
*
* @var \App\Repositories\TrickRepositoryInterface
*/
protected $tricks;
/**
* Create a new HomeController instance.
*
* @param \App\Repositories\TrickRepositoryInterface $tricks
*/
public function __construct(TrickRepositoryInterface $tricks)
{
parent::__construct();
$this->tricks = $tricks;
}
/**
* Show the homepage.
*
* @return \Response
*/
public function getIndex()
{
$tricks = $this->tricks->findAllPaginated();
return view('home.index', compact('tricks'));
}
/**
* Show the about page.
*
* @return \Response
*/
public function getAbout()
{
return view('home.about');
}
}