function meetings(Request $request) { switch ($request->input('filter')) { case 'future': return response()->json(Meeting::where('start_date', '>', Carbon::today()->timestamp)->get()); default: return response()->json(Meeting::all()); } }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { return response()->json(Meeting::all()); }