Revision #34 has been created by rackycz on Sep 20, 2019, 11:05:05 AM with the memo:
db
« previous (#33) next (#35) »
Changes
Title
unchanged
Yii v2 for beginners
Category
unchanged
Tutorials
Yii version
unchanged
2.0
Tags
unchanged
tutorial,beginner,yii2
Content
changed
[...]
- The new model will only have 3 methods: tableName(), rules(), attributeLabels()
- In order to use the DB for login, we need to implement IdentityInterface which requires [5 new methods](https://www.yiiframework.com/doc/api/2.0/yii-web-identityinterface). But as I do not need all those methods, in some of them I have commented out their body in the example below.
The final model should look like this:
```PHPphp
<?php
namespace app\models;
use Yii;[...]