Category: Laravel
-
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: 15 1. When executing the command: npm run build, prompt: npm err! missing script: “build”. as shown in Figure 1 2. Check the package.json file, you can confirm that the scripts does not contain the build script. as shown in Figure 2 3. According to the prompt: to see a list of scripts, run: npm run. To view…
-
Post Views: 18 1. Error in Laravel 6: Target[Interface]Is not instantiable while building[Resolver]. as shown in Figure 1 2. View git logs, analyze /modules/themestore/providers/themestoreServiceProvider.php, send Now there is a shared binding registered in the container: ThemeConfigLoaderInterface::Class, but now it does not exist. as shown in Figure 2 3. Finally found this shared binding: ThemeConfigLoaderInterface::Class has been moved to /modules/themesetting/providers/themesettingServiceProvider.php 4.…
-
Post Views: 19 1. In \Vendor\Laravel\Telescope\Src\Watchers\EventWatcher.php:91, an error is reported: get_class() expects parameter 1 to be object, string give. as shown in Figure 1 2. Check \Vendor\Laravel\Telescope\SRC\Watchers\EventWatcher.php:91 3. View the EventServiceProvider 4. This looks like a bug, and I see a new commit that just solves this problem. Submit:https://github.com/laravel/telescope/commit/a69fc6f4f5fd5b0ac5a242981e162774cbb69e17. Support new listeners syntax. as shown in Figure 2 5. I…
-
Post Views: 18 1. There are now 2 projects, and their domain names are: Object.local, Object-master.local. The redis configuration of its .env file is as follows 2. However, the performance at this stage is that both projects still use Redis 1. The problem caused by sharing a Redis 1 database is that when Object.local is opened, and then Object-master.local is…