namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; class NewEventController extends Controller { public function index() { // Retrieve the events data from the database $events = DB::table('events')->where('is_deleted', 0)->get(); // Return the data as a JSON response return response()->json($events); } }