Skip to content

Instantly share code, notes, and snippets.

@Mombuyish
Last active February 16, 2017 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mombuyish/3075d466e187fa142418ec0b3c40c427 to your computer and use it in GitHub Desktop.
Save Mombuyish/3075d466e187fa142418ec0b3c40c427 to your computer and use it in GitHub Desktop.
<?php
namespace App\Http\Controllers;
use App\Services\CollectionService;
use Illuminate\Http\Request;
class CollectionsController extends Controller
{
/**
* @var CollectionService
*/
private $collectionService;
public function __construct(CollectionService $collectionService)
{
$this->collectionService = $collectionService;
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$collections = $this->collectionService->all();
return view('collections.index', compact('collections'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment