Last active
March 22, 2016 16:54
-
-
Save marcoszf/5680189c16549fc6b16d to your computer and use it in GitHub Desktop.
mod Banner - emidcms - Laravel - Repository pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php namespace App\Http\Controllers; | |
| use App\Http\Requests; | |
| use App\Http\Controllers\Controller; | |
| use Illuminate\Http\Request; | |
| use Config; | |
| use File; | |
| use Input; | |
| use Mail; | |
| use Cache; | |
| use App\Services\BannersService; | |
| class HomeController extends Controller { | |
| private $bannerService; | |
| public function __construct(BannersService $bannerService){ | |
| $this->bannerService = $bannerService; | |
| } | |
| public function index() | |
| { | |
| /* Banners */ | |
| $rowsBanners = $this->bannerService->all(); | |
| return view('home')->with(['rowsBanners'=>$rowsBanners]); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment