Year: 2022
-
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: 70 1. On the Payment – Payment Method – Add Payment Methods page, enter the name on the bank account: Wang Qiang, and the prompt input is invalid. Bank name input: Bank of China, prompt input is invalid. as shown in Figure 1 2. Reference URL: https://support.google.com/adsense/answer/3372975?hl=zh-hans , Google AdSense Help – payment method – Wire Transfer –…
-
Post Views: 56 1. Search in GitHub: Laravel Module, select the first result: NWidArt / Laravel-Modules. It supports module management in Laravel. 2. Reference URL: https://nicolaswidart.com/blog/writing-modular-applications-with-laravel-modules . Why use this package, write modular applications using laravel-modules. When it comes to writing more complex and larger applications, it is found that Laravel’s default structure is cumbersome and not ideal. 3. To…
-
Post Views: 20 1. Use Composer locally to create a new Laravel project: laravel-theme-demo. 2. IGaster / Laravel-Theme is a Laravel package that adds basic support for management themes. It allows you to build views and assets in separate folders and support theme extensions. Execute the command: composer require “gaster/laravel-theme” to install igaster/laravel-theme. 3. Install Laravel Mix, execute: yarn install,…
-
Post Views: 16 1. Get started with the GraphQL server with Lighthouse. Reference URL:https://lighthouse-php.cn/tutorial/ 2. Create a GraphQL API for a simple blog from scratch. Create a new Laravel project via Composer: lighthouse-tutorial 3. Create a database: lighthouse_tutorial, and configure the database connection in .env. Run the database migration to create the Users table 4. Put some fake user data…