Category: Laravel 6
-
Post Views: 16 1. The current implementation principle of the theme editor is: when a configuration item in the editor changes, the temporary storage API of the backend will be requested to cache the data to Redis. When the user clicks the save button, the save API of the backend is requested, and the data will be read from Redis…
-
Post Views: 21 1. The front-end request parameters are shown below. as shown in Figure 1 2. The backend converts the parameter $args of the method __invoke to json, which corresponds to the field in the front-end request body: variables. The code is implemented as follows 3. Print the JSON as follows. There are more fields: directive, and then the…
-
Post Views: 19 1. In Laravel 6, when the URL does not exist, when the expected response is 404, the final response is 500. as shown in Figure 1 2. Open the URL:https://object.local/pages/ce-shi, the response 200. as shown in Figure 2 3. After deleting the data of this custom page in the database, the response is 500. as shown in…
-
Post Views: 17 1. Reference:https://www.shuijingwanwq.com/2022/11/02/7121/. Now, due to the existence of some special version numbers, it does not meet the specification of semantic 2.0. The final requirements are as follows: v2.0.0 < v2.0.0-h.1 2. Implement v2.0.0 < v2.0.0-h.1, after executing version_compare, the result is: bool(false), that is, v2.0.0 is not less than v2.0.0-h.1. 3. The existing code is implemented as…
-
Post Views: 19 1. Reference: In Linux and Laravel 6, the task queue is always running for troubleshooting and analysis (timeout time has been set):https://www.shuijingwanwq.com/2022/11/10/7139/. The previous reason was that the command line did not return 1 when Artisan::Call was executed, which caused the judgment to be invalid. 2. But after the solution, the task queue has been running again…
-
Post Views: 21 1. Existing code implementation 2. The final generated structure is as follows, which is an array with the field name: SETTING_MIGRATIONS 3. Decide to adjust the name of the adjustment field as extra, and include the value of the setting_migrations field. The code is adjusted as follows, based on the helper function ar. 4. The final generated…
-
Post Views: 20 1. The command in the task queue artisan::call, the code is as follows 2. Check the generated log file to confirm that the command has been executed. Confirm that the command was not executed because the log file for execCommandHandler-InstallTheme-1- was not generated. as shown in Figure 1 3. Decide to manually execute the command line in…
-
Post Views: 19 1. The code is as follows, set the value in the json field of mysql, and report an error: unsupported opera and types . as shown in Figure 1 2. The adjustment code is as follows 3. Implement a new JSON to the field when there is a value in the JSON field. The structure of the…