public function indexMonth($year, $month)
 {
     $oneMonthViewOfDaysWithTelomeres = Day::oneMonthViewOfDaysWithTelomeres($month, $year);
     if ($month == 12) {
         $nextMonth = 1;
         $yearNext = $year + 1;
     } else {
         $nextMonth = $month + 1;
         $yearNext = $year;
     }
     if ($month == 1) {
         $previousMonth = 12;
         $yearPrevious = $year - 1;
     } else {
         $previousMonth = $month - 1;
         $yearPrevious = $year;
     }
     return View::make('days.test', compact(['oneMonthViewOfDaysWithTelomeres', 'nextMonth', 'previousMonth', 'year', 'yearNext', 'yearPrevious']));
 }
 public function getCalendarMonthViewOfYearAndMonth($yearInput, $monthInput)
 {
     $dt = Carbon::parse($monthInput . '/01/' . $yearInput);
     $month = $dt->month;
     $year = strval($dt->year);
     $oneMonthViewOfDaysWithTelomeres = Day::oneMonthViewOfDaysWithTelomeres($month, $year);
     if ($month == 12) {
         $nextMonth = 1;
         $yearNext = $year + 1;
     } else {
         $nextMonth = $month + 1;
         $yearNext = $year;
     }
     if ($month == 1) {
         $previousMonth = 12;
         $yearPrevious = $year - 1;
     } else {
         $previousMonth = $month - 1;
         $yearPrevious = $year;
     }
     return View::make('api.days.month', compact(['oneMonthViewOfDaysWithTelomeres', 'nextMonth', 'previousMonth', 'year', 'yearNext', 'yearPrevious']));
 }
 public function create()
 {
     $locations = Location::all();
     $dt = Carbon::today();
     $month = $dt->month;
     $year = $dt->year;
     $oneMonthViewOfDaysWithTelomeres = Day::oneMonthViewOfDaysWithTelomeres($month, $year);
     if ($month == 12) {
         $nextMonth = 1;
         $yearNext = $year + 1;
     } else {
         $nextMonth = $month + 1;
         $yearNext = $year;
     }
     if ($month == 1) {
         $previousMonth = 12;
         $yearPrevious = $year - 1;
     } else {
         $previousMonth = $month - 1;
         $yearPrevious = $year;
     }
     $recurringAvailabilities = RecurringAvailability::where('advisor_id', Auth::user()->id)->get();
     return View::make('user.availabilities.create', compact(['oneMonthViewOfDaysWithTelomeres', 'nextMonth', 'previousMonth', 'year', 'yearNext', 'yearPrevious', 'locations', 'recurringAvailabilities']));
 }