Revision #72 was created by rackycz on Sep 1, 2026, 1:19:59 PM.
CRUD
Content
[...]
data-hx-swap="innerHTML">
Click me (and watch the traffic in devtools)
</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)
- [method findAll()](https://github.com/rackycz/yii3web/blob/master/src/Entity/QueryBuilder/UserQueryBuilderRepository.php)
- [QueryDataReader](https://github.com/rackycz/yii3web/blob/master/src/Entity/QueryBuilder/QueryDataReader.php)
- [View](https://github.com/rackycz/yii3web/blob/master/src/User/View/index.php)
## User - CRUD
In my demo you can see how I created the UpdateAction + form to enable editing and deleting of users.
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.