use yii\db\ActiveRecord; class User extends ActiveRecord { // Define the fields of the "user" table public static function tableName() { return 'user'; } } // Create a new user record $user = new User(); $user->name = 'John Doe'; $user->email = 'johndoe@example.com'; $user->save(); // Retrieve a user record by ID $user = User::find()->where(['id' => 1])->one(); // Update a user record $user->name = 'Jane Doe'; $user->save(); // Delete a user record $user->delete();In this example, we define a `User` class that extends Yii's `ActiveRecord` class. We define the table name in the `tableName()` method. Then we create a new user record, retrieve a user record by ID, update a user record, and delete a user record, all using simple PHP code. Overall, Yii is a powerful PHP web application framework that provides developers with a wide range of features and tools for building robust, high-performance web applications quickly and efficiently. It uses packages and libraries such as Symfony, Swift Mailer, and jQuery.