/** * @param string $slug */ public function show($slug) { $cycle = $this->cyclesRepository->findBySlug($slug); $exhibitions = $this->exhibitionsRepository->findByCycle($cycle, Carbon::today(), Carbon::today()->addMonth(2)); if ($cycle === null) { App::abort(404); } return View::make('exhibitions.frontend.cycles.show', compact('cycle', 'exhibitions')); }
/** * @param $id * @return mixed */ public function show($id) { $exhibition = $this->repository->find($id); return View::make('exhibitions.frontend.exhibitions.show', compact('exhibition')); }
/** * @param string $title * @return \Illuminate\Pagination\Paginator */ public function findByTitleSinceToday($title) { $until = Carbon::today()->addMonths(2); $exhibitions = $this->exhibitionsRepository->findBy(compact('title'), Carbon::today(), $until); return $exhibitions; }