Yii v2 snippet guide

Comparing #29 with #30

Revision #30 was created by rackycz rackycz on Sep 20, 2019, 10:01:16 AM.

db

Content

[...]
INSERT INTO `user` (`id`, `username`, `password`) VALUES (NULL, 'user01', '0497fe4d674fe37194a6fcb08913e596ef6a307f');
```

If you must use MyISAM instead of InnoDB, just change the word InnoDB into MYISAM.

Then use GII to generate model, views and controller. The
GII URL will probably be
- [http://localhost/basic/web/index.php?r=gii](http://localhost/basic/web/index.php?r=gii).
- When creating the model, check this checkbox: **Enable I18N** ... we will need i18n later
- Note that there already is a model named User in the demo app. You will not need it if you want to use login-via-DB so feel free to check "Overwrite" in GII. The newly created User model will now be usable only for table operations, not for login. But we will enhance it, keep reading.
[...]