public function testCanGetAll() { $this->assertEmpty($this->repository->getAll()); $this->saveTestSeries(); $this->saveTestSeries(true); $this->assertCount(2, $this->repository->getAll()); $this->assertCount(1, $this->repository->getAll(true)); }
/** * Mostra l'elenco delle serie pubblicate sul sito. * * @param SeriesRepository $seriesRepository * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function getSeries(SeriesRepository $seriesRepository) { try { $series = $seriesRepository->getAll(true); return view('front.series', compact('series')); } catch (NotFoundException $e) { throw new NotFoundHttpException(); } }
/** * Mostra l'elenco delle serie presenti nel sistema. * * @param SeriesRepository $seriesRepository * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function getIndex(SeriesRepository $seriesRepository) { $series = $seriesRepository->getAll(); return view('admin.series_index', compact('series')); }