public function getIndex() { $lastWebinar = Webinar::where('date_time', '<', Carbon::now())->orderBy('id', 'desc')->first(); $nextWebinars = Webinar::where('date_time', '>', Carbon::now())->get(); $groups = FacebookGroup::all(); return view('index/home', ['last_webinar' => $lastWebinar, 'next_webinars' => $nextWebinars, 'groups' => $groups]); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy(Webinar $webinar) { $webinar->delete(); return redirect(route('webinar.index')); }