Author: 永夜
-
Post Views: 53 1. Use updateAll() to update the value of prev_status to the value of status, and update the value of status to 4, the table structure is shown in Figure 1 2. Based on the query builder, the code is as follows 3. However, it does not meet the expectations. The values of prev_status are updated with 0,…
-
Post Views: 12 1. Edit \api\config\urlmanager.php, define the route to support put close/{id} 2. Edit \API\Controllers\PlantaskController.php, and define the action to support the close method 3. Edit \API\RESTS\plan_task\action.php, copy public function findModel($id) to public function findModels($id) to support finding multiple models 4. All IDs must exist, otherwise the response will fail, as shown in Figure 1 5. Create a new…
-
Post Views: 18 1. The model class file in the /common/models directory is only allowed to be generated by the GII tool, which is a common model data layer, as shown in Figure 1 2. The model file in the /common/logics directory is related to business logic, which is inherited to /common/models The data layer is the common model logic…
-
Post Views: 51 1. In Windows 10, right-click the system -> New -> There is no new text document, and it was used by the family for a while, and it was lost, as shown in Figure 1 2. Reference website: https://answers.microsoft.com/zh-hans/windows/forum/windows_7-desktop/%e 7%B3%BB%E7%BB%9F%E5%8F%B3%E9%94%AE%E6%96 %B0/8BA81D6B-24BF-4655-AFC1-3D0651013087 3. Click Start, enter notepad in “Start Search”, and open notepad2, as shown in Figure 2…
-
Post Views: 16 1. \API\RESTS\PLAN_TASK\CreateAction.php, please refer to the URL for the specific implementation:https://github.com/yiisoft/yii2/blob/master/docs/guide-zh-CN/input-tabular-input.md, the code is as follows: 2. On Postman, the request parameters are shown in Figure 1 3. At the request of the front-end, add the form name, \api\rests\plan_task\createaction.php, the code is as follows 4. \common\logics\plantask.php, the code is as follows 5. On Postman, the request parameters…
-
Post Views: 50 1. The code of the Dockerfile is as follows: 2. When building based on Jenkins, the details of the error are as follows, as shown in Figure 1 3. Edit the dockerfile, temporarily cancel the composer related, after the build is successful, run composer -v in the docker container, no response, as shown in Figure 2 4.…
-
Post Views: 14 1. shuijingwan/yii2-app-advanced (github), as shown in Figure 1 (1) Project maintainer: wangqiang (2) Public warehouse:https://github.com/shuijingwan/yii2-app-advanced.git (3) Visible grade of public warehouse: public (4) The maintainer clones from the public warehouse, and performs pull and push in his own local repository (github-shuijingwan-yii2-app-advanced). (5) Branch: long-term branch: master; short-term branch: function (feature) branch, pre-release (release) branch, patch bug (fixbug)…
-
Post Views: 73 1. Delete the controller \API\Controllers\SiteController.php, delete the model \api\models\contactform.php, \api\models\loginform.php, \api\models\PasswordResetRequ estform.php, \api\models\resetpasswordform.php, \api\models\signupform.php, delete the directory (view related) \api\views, \api\assets, \api\web\css 2. Delete the relevant files of the test (unit test, functional test, acceptance test), delete \api\tests\acceptance\homecest.php, delete \API\Tests\Functional\AboutCest.php, \API\Tests\Functional\ContactCest.php, \API\Tests\Functio NAL\HOMECEST.php, \API\Tests\Functional\logincest.php, \api\tests\functional\signupcest.php, delete \API\Tests\Unit\Models\ContactFormTest.php, \API\Tests\Unit\Models\PasswordResetRequestFormTest .php, \api\tests\unit\models\resetpasswordformtest.php, \api\tests\unit\models\signupformtest.php 3. Run all the sample tests,…