Year: 2023
-
Post Views: 17 1. In Laravel 6, ThemeInstallation::IscodeEdited must return a relationship instance.. as shown in Figure 1 2. View the method in the model file 3. Finally found the reason, $theme->ThemeInstallation->iscodeEdited needs to add ()
-
Post Views: 21 1. In Altair GraphQL Client, click the button on the left side of the overloaded document in the address bar, the drop-down list will appear, and select Add to Favorites. as shown in Figure 1 2. Select a collection to create a new favorite. as shown in Figure 2 3. Named collection: Shop GraphQL API, choose a…
-
Post Views: 20 1. When I encounter a bug in the production environment, after a new container is newly deployed, when the first run, the value of the environment variables feels that it is not the environment variable of the container, but null. On the second run, the value of its environment variables is correct. On the first run, the…
-
Post Views: 12 1. Query the list (converted to an array) in Laravel 6, why you have to convert it to an array, the reason is that the current requirements are additional fields that need to be assigned a single record during the traversal process. This extra field does not exist in the model. 2. Cause the occurrence of N…
-
Post Views: 17 1. In GraphQL Mutation, in the same HTTP request, only one mutation is now executed. as shown in Figure 1 2. When there are too many HTTP requests per unit time, the current limit of the interface will be triggered. as shown in Figure 2 3. It is planned to execute multiple mutations in the same HTTP…
-
Post Views: 17 1. Table TABLE_A is in the A database, and the table TABLE_B is in the B database. The two tables are linked together via columns table_a.id , table_b.table_a_id . 2. Refer to the advanced JOIN statement:https://learnku.com/docs/laravel/6.x/queries/5171#211e4f. Reference:https://stackoverflow.com/questions/41423603/join-two-mysql-tables-in-different-databases-on-the-same-server-with-laravel-elo. as shown in Figure 1 3. The final code is as follows 4. The final generated SQL is as follows,…
-
Post Views: 19 1. Define in the GraphQL schema file as follows 2. In the custom validator class Validator classes modules\\OnlineStoreEthemeGraphQL\\Validators\\UnpublishThemeValidator, the code is implemented as follows 3. The request verification failed, which is in line with expectations. as shown in Figure 1 4. Confirm the sql generated by the verification rule again, and generate the following. as shown in…