Category: Laravel 6
-
Post Views: 16 1. Reference URL:https://lighthouse-php.com/4/testing/phpunit.html#setup, test with phpunit . In Lighthouse, it is easy to add automated tests with phpunit. 2. Run the GraphQL Query API and respond 200. The main test field: The responses of TheMeAssets. as shown in Figure 1 3. Edit /modules/themestore/tests/functional/graphql/onlineStoreEthemeGraphQLapTest.php, the code is as follows 4. Execute the command: ./vendor/bin/phpunit .\modules\themestore\tests\functional\graphql\OnlineStoreEthemeGraphQLapTest.php . Error: Failed…
-
Post Views: 15 1. The name of the table field is in the form of lowercase letters and underscores. as shown in Figure 1 2. The interface is implemented based on GraphQL, and the field name that is specified as the interface response must be in the form of hump. 3. Print the parser /modules/themestore/resolver/onlinestoreetheme/themeassesResolver.php method $themeAssets, the object property…
-
Post Views: 13 1. In Lighthouse 4.10.1, add a new Query Type: There is no effect after obtaining the theme material list. 2. Check the document, there is no existence to get the list of theme materials. as shown in Figure 1 3. Refer to schema caching:https://lighthouse-php.com/4/performance/schema-caching.html, it is recommended to enable cache in production mode. Now for the local…
-
Post Views: 17 1. In the Git library, it is found that the database migration file has some changes, such as: the field MINE_TYPE is changed to MIME_TYPE. as shown in Figure 1 2. 2 database migration files, just in the last migration. as shown in Figure 2 To roll back the migration, if you want to roll back the…
-
Post Views: 17 1. When executing composer require, an error is reported:[Composer\Downloader\TransportException]Curl Error 6 while downloadinghttps://api/v4/projects/%2Fnova:Could not resolve host: API . as shown in Figure 1 2. Check the composer.json file, which contains nova-related configuration items. 3. Create a new file: C:\Users\Lenovo\AppData\Roaming\Composer\Auth.json. Specific values need to be set by yourself. as shown in Figure 2 4. When the Composer require…
-
Post Views: 21 1. In Laravel 6, execute the command: php artisan telescope:publish, report an error: Unable to local publishable resources. Publishing complete. as shown in Figure 1 2. Check composer.json, laravel/teleScope exists in require-dev. 3. Check the directory /config, the file telescope.php already exists, the file: /app/providers/teleScopeServiceProvider.php already exists. But the directory /public/vendor/teleScope does not exist. 4. Access:http://object.local/telescope, the…
-
Post Views: 18 1. Report an error in Laravel 6: log.error: this cache store does not support tagging. {“exception”:{}}. as shown in Figure 1 2. Check the log file, /storage/logs/laravel-2022-01-11.log 3. Edit the .env file, and adjust the cache_driver=file to cache_driver=redis. No more errors. as shown in Figure 2