Yii3 - How to start

Comparing #72 with #73

Revision #73 was created by rackycz rackycz on Sep 1, 2026, 1:36:50 PM.

CRUD

Content

[...]
</button>
```

## GridView + CRUD for Users

Grid view is in package `yiisoft/yii-dataview`. The source code is extremely verbose and complex to me
 (compared to how primitive function it should provide), so I am just linking my GitHub demo:

- [IndexAction](https://github.com/rackycz/yii3web/blob/master/src/User/Action/IndexAction.php)
[...]
- [View](https://github.com/rackycz/yii3web/blob/master/src/User/View/index.php)

> In my demothe UpdateAction I am presenting the ActiveRecord
 
 
Below
you can also see how I created the UpdateAction + form to enable editing and deleting of users.

- [UpdateAction](https://github.com/rackycz/yii3web/blob/master/src/User/Action/UpdateAction.php)
[...]
- [Form + Validation](https://github.com/rackycz/yii3web/blob/master/src/User/Form/UserUpdateForm.php)


 
> In Yii3, validation rules are not part of the model - special form-class must be created. In Yii2 you didn't need the form-class for model-driven (db-driven) forms.

## ActiveRecord

Example of usage is in the following files. ActiveRecord combines 2 classes: Entity + Repository = data and DB manipulation.
[...]