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