function deleteAll(Request $request) { $events = UserEvent::all(); foreach ($events as $event) { $event->delete(); } return redirect('/'); }
public function list_events() { $events = UserEvent::all(); return view('list_events', ['events' => $events]); }