示例#1
0
 /**
  * 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'));
 }
示例#2
0
 /**
  * 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'));
 }