Category: Laravel Modules
-
Post Views: 20 1. When the file module.json is deleted under modules/blog, a new migration file is generated: nwidart\modules\exceptions\moduleNotFoundException : module[Blog]does not exist!. as shown in Figure 1 2. Use the make:migration artisan command to create a migration, and use the –path option to customize the personal storage path that generates the migration file. as shown in Figure 2 3.…
-
Post Views: 62 1. Generate a new module: blog. 2. By default, the module class will not load automatically. You can load your modules automatically using PSR-4. Edit composer.json. as shown in Figure 1 3. Tip: Don’t forget to run composer dump-autoload. as shown in Figure 2 4. Generate a given console command for the specified module. 5. Edit CreatePostCommand.php,…
-
Post Views: 15 1. Now the translation strings are stored in the files in the resources/lang directory. In this directory, every language supported by the application should have a corresponding subdirectory: 2. The previous call method: return trans(online_store_theme_graphql::validation.custom.theme_editor_session.theme_editor_session_id_exists_rule); 3. Plan to translate files are stored in the resources/lang directory in JSON format 3. Deliberately distinguish /en/validation.php from en.json to confirm…
-
Post Views: 20 1. In Lighthouse 5, an error is reported: illuminate\contracts\container\bindingResolutionException : target[Interface]Is not instantiable while building[Resolver]… as shown in Figure 1 2. Edit ThemeStoreGraphQL/Resources/GraphQL/Theme_Setting.GraphQL , comment out: TemplateSettingsData(BaseName: String!):[ThemeSection]@field(resolver: “modules\\themestoreGraphQL\\resolver\\onlinestoreetheme\\TemplateSettingsDataResolver”). Then no errors will be reported. 3. After uncommenting, check ThemeStoreGraphQL/Resolver/OnlineStoreEtheme/TemplateSettingsDateResolver.php . TemplateSchemaLoaderInterface is passed as a parameter to the constructor. 4. Check the service provider class of…
-
Post Views: 18 1. In the startup script of the docker container, if you want to force the migration command to run without prompt, use the –force parameter 2. At this stage, there is a module developed based on Laravel Modules, and there are migration files, such as: /modules/themestoredb/database/migrations . as shown in Figure 1 3. In the local development…
-
Post Views: 20 1. Use the following Artisan command to generate a new queue task for the specified module. as shown in Figure 1 2. Task distribution, push tasks to the queue 3. Edit /modules/themestoredb/jobs/themeinstallation.php . The processing example in the queue is mainly to change the value of the field step of the table Theme_Installation_Task to 2. 4. Start…
-
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: 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: 19 1. In PHPStorm and Laravel 6, the event log: Switch Laravel Idea Module System to Laravel-Modules? Switch or DonT show this again. as shown in Figure 1 2. Reference:https://laravel-idea.com/docs/modules. Laravel Idea uses module system concepts to understand the structure of the application. It helps with the correct view, configuration, routing and more convenient code generation. The module…