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'])); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $locations = Location::all(); return View::make('locations.index', compact(['locations'])); }