Category: Web Framework
-
Post Views: 16 1. In Laravel 6, you need to query the penultimate record. as shown in Figure 1 2. Based on the reverse order, use LIMIT, the code is implemented as follows 3. The printing results are in line with expectations. as shown in Figure 2
-
Post Views: 20 1. Reference:filemTime(): stat failed for /var/www/object/storage/app/theme_downloads/2023/07/19/16 89733510.7774.265283535/migrations/migrate_cart.blade.php 2. Reference:In Laravel 6, after binding a singleton in the service container, how to reset the parameters of the constructor of the singleton when parsing? 3. The source of the error report is that during the execution of the queue, the execution of each task will execute view::addLocation($location); however, the…
-
Post Views: 18 1. When executing array_diff in PHP 7.4 — when calculating the difference set of the array, an error is reported: Object of class theme version could not be converted to string. as shown in Figure 1 2. The code is implemented as follows, and print the two arrays of comparisons respectively 3. Adjust to array_udiff — Use…
-
Post Views: 20 1. Records in the current table. as shown in Figure 1 2. The realization of the file list is as follows 3. Due to the need to take out the file: the v2.0.28 part in migrations/v2.0.28/migrate_settings_data.php. There are some files: migrations/migrate_cart.blade.php does not exist in the v2.0.28 part, so you need to filter them out first. The…
-
Post Views: 13 1. Bind a singleton to the service container, the existing implementation is as follows 2. Now there is a need to reset the parameters of the constructor of the singleton after parsing a singleton. The new implementation is as follows 3. App(ThemeHandler::Class,[]) with the app(ThemeHandler::Class,[‘migrationsLocation’ => ‘E:/wwwroot/object/Modules/ThemeStoreDb/Resources/setting_migrations1’]) The parameters in the construction method are output to the…
-
Post Views: 18 1. Error when the program is running: syntax error, unexpected,, expecting]. as shown in Figure 1 2. The code to catch the exception is implemented as follows, and finally find that the exception is not caught 3. Adjust the code implementation, and change the Throwable $E to \Throwable $E. Capture was successful. The log is generated as…
-
Post Views: 19 1. Reference:Deploy Shopify PHP application to production environment (CentOS 7.7 64-bit in Alibaba Cloud, ECS, MySQL 5.7) 2. When the application: learn-php-app-ubuntu-2004-0605 is newly created and deployed the theme application extension. The test passed, in line with expectations. as shown in Figure 1 3. Upload the application in the local environment: learn-php-app-ubuntu-2004-0605 Web The code below is…
-
Post Views: 155 1. There is a Shopify PHP application, which can already be previewed in the development environment. as shown in Figure 1 2. Now it is ready to be deployed to the production environment. Shopify recommends creating a separate application if you need to deploy the application to the production environment. This application shares the code base with…