Year: 2022
-
Post Views: 17 1. When the language area is en , when the validated parameter does not exist, the response: The selected theme ID is invalid. as shown in Figure 1 2. When the language area is zh_cn, when the validated parameter does not exist, the response: the selected Theme ID is invalid. Expected: The selected theme ID is invalid.…
-
Post Views: 17 1. In the program implementation, first request the API to generate a cache ID. Then request the API, delete the cache ID. as shown in Figure 1 2. If you want to pass in the test, the premise is that there must be a clear cache ID to delete the parameters of the request. 3. Reference URL:https://learnku.com/laravel/t/22690.…
-
Post Views: 18 1. At this stage, you need to implement an interface to delete the cache ID in the GraphQL API. Refer to the Shopify example. When the cache ID does not exist, the response fails. as shown in Figure 1 2. Due to the rule to verify whether this cache ID exists, it will be used in a…
-
Post Views: 17 1. When using Redis with Laravel, there are two solutions, one is to install the phpredis php extension, and the other is to install the predis/predis package through composer. However, Predis has been abandoned by the original author of the package and may be removed from Laravel in future releases. It was finally decided to use the…
-
Post Views: 18 1. Reference URL:https://learnku.com/docs/laravel/6.x/blade/5147#20f1dd. Blade Template – Components & Slots 2. First write a reusable “alert” component, we want to reuse it in the application, create a new file: /resources/views/alert.blade.php 3. Configure the route in /routes/web.php 4. Create a new template file: /resources/views/component.blade.php 5. Open the URL: view-source:http://laravel-theme-demo.local/component. View the source code. in line with expectations. as shown…
-
Post Views: 20 1. In Laravel 6.20.43, Lighthouse 5.45.0, the classClearSschemaCacheDeprecated. as shown in Figure 1 2. The reason should be caused by the change of the version of the lighthouse. genusClearSschemaCacheThe effect is to clear the pattern cache before running any tests. 3. Reference:https://lighthouse-php.com/5/testing/phpunit.html#setup, decide to replace with the classRefressschemaCache 4. Edit /modules/themestore/tests/functional/graphql/themeAssetGraphqlaptest.php. as shown in Figure 2 5.…
-
Post Views: 22 1. The structure when the request responds successfully. as shown in Figure 1 2. However, at this stage, there is no security verification for the request parameters. Reference:https://lighthouse-php.com/master/security/validation.html#single-arguments. Lighthouse allows you to use Laravel’s validation in queries and changes. 3. The change of this GraphQL API has only one request parameter, that is, themeID, and only need…
-
Post Views: 19 1. When executing composer install, an error is reported: classPine\BladeFilters\BladeFiltersnot found. as shown in Figure 1 2. Edit composer.json, add “conedevelopment/blade-filters”: “^0.8” 3. When executing again, the prompt: key ConeDevelopment/blade-filters is a duplicate in ./composer.json at line 91. warning: the lock file is not up to date with the latest changes in composer.json. as shown in Figure…