/** * Display a listing of the resource. * * @param SourceRepository $resourceRepository * @return Response * @throws Exception */ public function index(SourceRepository $resourceRepository) { try { $resources = $resourceRepository->all()->groupBy('type'); return view('home', compact('resources')); } catch (Exception $e) { throw $e; } }
/** * get the name from a provider source id * * @return mixed * @throws Exception */ protected function getSourceName() { return $this->sourceRepository->pluckById($this->getParam('source_id'), 'name'); }