Category: Laravel 6
-
Post Views: 21 1. Reference:In Laravel 6, during the execution of the queue, the execution of each task will execute view::addLocation($location); however, each task will only take the $location of the first task. . However, it is found that there are still problems in the subsequent production environment. During queue execution, some view files are not executed (“Setting_Migrations”:[]). as shown…
-
Post Views: 15 1. Now you need to take the URI format data from a one-dimensional array. The print result of a one-dimensional array, as shown in Figure 1 2. The implementation is as follows based on the filter_var code, and the printing result is as follows, which does not meet the expectations, which exists: internal://policy_pages/29 3. Obtain the scheme…
-
Post Views: 19 1. When writing a log in Laravel 6, the log file at that time was not created. When writing the log, the time of the operating system is Beijing time: 2023-09-15 11 , but laravel-2023-09-15.log is not generated. as shown in Figure 1 2. Found only Laravel-2023-09-14.log, print output: config(app.timezone). The reason for the discovery is that…
-
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: 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…