/** * @param $view */ public function compose(View $view) { $viewData = $view->getData(); $date = array_has($viewData, 'date') && $viewData['date'] ? $viewData['date'] : Carbon::today(); $calendar = $this->manager->getCalendar(Carbon::today()); $lastBillboard = $this->billboardsRepository->findNewer(); $view->with('calendar', $calendar); $view->with('date', $date); $view->with('lastBillboard', $lastBillboard); }
/** * @return string */ public function getDateInFormatToUrl() { $monthsMap = ExhibitionsManager::getMonthsMap(); $date = $this->date->day . '-' . $monthsMap[$this->date->month - 1] . '-' . $this->date->year; return $date; }
public function searchFilms() { $exhibitions = $this->manager->findByTitleSinceToday(Input::get('titlte', '')); $filmsNames = $this->manager->getFilmsTitles($exhibitions->getCollection()); return JsonResponse::create($filmsNames->toArray()); }