to create a model in gii −
<?php
   namespace app\models;
   use app\components\uppercasebehavior;
   use yii;
   /**
   * this is the model class for table "user".
   *
   * @property integer $id
   * @property string $name
   * @property string $email
   */
   class myuser extends \yii\db\activerecord {
      /**
      * @inheritdoc
      */
      public static function tablename() {
         return 'user';
      }
      /**
      * @inheritdoc
      */
      public function rules() {
         return [
            [['name', 'email'], 'string', 'max' => 255]
         ];
      }
      /**
      * @inheritdoc
      */
      public function attributelabels() {
         return [
            'id' => 'id',
            'name' => 'name',
            'email' => 'email',
         ];
      }
   }
?>
generating crud
let us generate crud for the myuser model.
step 1 − open the crud generator interface, fill in the form.
step 2 − then, click the “preview” button and “generate”. go to the url http://localhost:8080/index.php?r=my-user, you will see the list of all users.
step 3 − open the url http://localhost:8080/index.php?r=my-user/create. you should see a user create form.