Exemplo n.º 1
0
 public function calendar()
 {
     $thisYear = date('Y', strtotime('now'));
     $thisMonth = date('m', strtotime('now'));
     if ($thisMonth == 12) {
         $nextMonth = '01';
         $nextYear = date('Y', strtotime('+1 year'));
     } else {
         $nextMonth = date('m', strtotime('+1 month'));
         $nextYear = date('Y', strtotime('now'));
     }
     $thisMonthData = $this->repo->getCalendar($thisYear, $thisMonth);
     $nextMonthData = $this->repo->getCalendar($nextYear, $nextMonth);
     $thisMonthEvents = Calendar::generate($thisYear, $thisMonth, $thisMonthData);
     $nextMonthEvents = Calendar::generate($nextYear, $nextMonth, $nextMonthData);
     return view('about.calendar', array('thisMonth' => $thisMonthEvents, 'nextMonth' => $nextMonthEvents, 'pageTitle' => 'Lambda Calendar', 'panelTitle' => 'Lambda Calendar'));
 }