Tagged: SoftDelete

执行数据库迁移命令,查看数据库表 user 结构,符合预期 0

Based on yiisoft/yii2-app-advanced, create a new repository yii2-app-advanced on github, and create a new interface application (implement RESTful-style web service services. API), realize the soft deletion of ActiveRecord, generate ActiveQuery, and customize the query class (2)

浏览量: 19 1. In Postman, posthttp://api.github-shuijingwan-yii2-app-advanced.localhost/v1/users201 response, the status value is 1 by default 2. In Postman, deletehttp://api.github-shuijingwan-yii2-app-advanced.localhost/v1/users/1, 200 responses 3. In Postman, posthttp://api.github-shuijingwan-yii2-app-advanced.localhost/v1/users,422 response, not as expected, expected to be 201 response, because...

浏览 user 表数据,status、updated_at 已经更新 0

Based on yiisoft/yii2-app-advanced, create a new repository yii2-app-advanced on github, and create a new interface application (implement RESTful-style web service services. API), realize the soft deletion of ActiveRecord, generate ActiveQuery, and customize the query class

浏览量: 12 1. Based on yii2tech\ar\SoftDelete\SoftDeleteBehavior, the soft deletion of ActiveRecord is realized, and the URL is opened:https://github.com/yiisoft/yii2/blob/master/docs/guide-zh-CN/concept-behaviors.md, as shown in Figure 1 2. Install the ActiveRecord extension of Yii2, use the self-update command...