/** * Show the index that allows users to quickly register for the upcoming meal * @return View */ public function index() { $data = []; // Add more data if we have a current user if (OAuth::valid()) { $data['meals'] = Meal::available()->get(); $data['user'] = OAuth::user(); } else { $data['meals'] = Meal::available()->take(1)->get(); } return $this->setPageContent(view('register/index', $data)); }