/** * Display a listing of the resource. * * @return Response */ public function index() { $classes_available = Classe::Upcoming()->where('date', '<', Carbon::now()->next(Carbon::MONDAY))->count(); return view('welcome', compact('classes_available')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $classes = Classe::Upcoming()->orderBy('date', 'asc')->get(); $next_class = $classes->shift(); return view('classes.index', compact('classes', 'next_class')); }