// Import database connection require_once 'db.php'; class User { public function findAll() { $query = "SELECT * FROM users"; $result = mysqli_query($conn, $query); $users = array(); while ($row = mysqli_fetch_assoc($result)) { $user = new stdClass(); $user->id = $row['id']; $user->name = $row['name']; $user->email = $row['email']; array_push($users, $user); } return $users; } } // Usage $user = new User(); $users = $user->findAll(); var_dump($users);In the above code, we have added a `findAll` method to the `User` model which runs a SELECT statement on the database table "users" and returns all users. We have used MYSQLi to execute the database query. The package library used for this code is MYSQLi extension in PHP. It is a PHP extension that allows interaction with MYSQL databases.