Tag: Laravel
-
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: 19 1. When performing database migration, an error is reported: sqlstate[42000]: Syntax Error or Access Violation: 1059 Identifier nametheme_installation_version_preset_theme_store_theme_version_id_indexis too long. as shown in Figure 1 The index length limit of MySQL 5.7 defaults to 64, while the length of the Theme_Installation_Version_Preset_Theme_Store_Theme_Version_ID_Index is 68. as shown in Figure 2 3. In Laravel 6, each indexing method accepts an…
-
Post Views: 18 1. In Laravel 6’s database migration, when adding a foreign key constraint, Illuminate\Database\QueryException : SQLState[HY000]: General error: 1215 Cannot add foreign key constraint. as shown in Figure 1 2. The code is implemented as follows 3. The code is adjusted as follows, and the error is still reported: 4. The field ASSET_ID type of the table Theme_Asset_Version…
-
Post Views: 22 1. Check the existing code, which is implemented based on the function app. The app function returns the service container instance. Unable to jump to the corresponding method by clicking getByName() . as shown in Figure 1 2. Refer to the automatic injection of the service container. You can simply inject the dependencies that require container resolution,…
-
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: 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: 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…