Пример #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'));
 }