Category: Web Framework
-
Post Views: 20 1. In Laravel 6, when installing Laravel Mix (npm install), an error is reported: npm err! Eresolve Unable to resolve dependency tree. as shown in Figure 1 2. Find the existence of the program root directory: yarn.lock, replace with: yarn command, no more errors. as shown in Figure 2
-
Post Views: 20 1. The existing code is implemented as follows 2. Use reference pass to implement in thin code, you can put arr::forget($schema,sections.. $SectionKey ..blocks.. $blockkey); replace with: arr::forget($section,blocks.. $blockkey);
-
Post Views: 22 1. In Laravel 6, the request with query parameters is lost after the 302 jump. as shown in Figure 1 2. The original plan to determine whether the query parameter exists at a specific request. If it exists, it will be automatically brought with it after the 302 jump. However, this scheme cannot be avoided that there…
-
Post Views: 13 1. In Laravel 6, there is a simple implementation based on the judgment that the string contains ? 2. However, this implementation, some complex URIs are not considered. Example: ?d=3&e=5#6, will be replaced with: ?d=3&e=5#6&d=https://xxx.com. 3. The final decision is to add query parameters based on the League/URI, and execute the composer require League/uri-components and composer require…
-
Post Views: 17 1. In Laravel 6, define the route as follows 2. Now you need to adjust /static/xxx to get the value from the environment variable, that is, use the global config function to access the configuration value 3. Print output/ / *. config(filesystems.disks.theme-asset-cdn.root) .{theme_id}/{asset_key}, its value is: /static/xxx/{theme_id}/{asset_key} . and the corresponding controller method can be executed. in…
-
Post Views: 15 1. The route of a requesting resource file is as follows: /static/xxx/9915995c-2952-4 90c-8e51-037a0950233c/assets/js/react.f886be.js 2. Since / is included in asset_key. Laravel routing components allow all characters except / . You must explicitly allow / to be part of a placeholder using the WHERE conditional regular expression. Otherwise, the route will fall back. The routes/web.php file is used…
-
Post Views: 15 1. In Laravel TeleScope’s Job queries, some SQL statements are not recorded. Queries (22) is actually far more than 22. as shown in Figure 1 2. Check Laravel/Tescope in composer.json, its version is: v2.1.7 . as shown in Figure 2 Clear the table starting with Telescope_ and re-execute the Job. In Laravel Telescope’s queries, find all the…
-
Post Views: 21 1. URL:https://object.local/?oseid=2052A62hlvOV6hlqej5yS2MwoYpUxXTtMQQb, when a certain condition is met, you want to delete the query parameter: oseid and make the URL change to:https://object.local/. Don’t want to use 302 jump implementation. 2. The specific implementation is as follows 3. The printing results are as follows, in line with expectations. as shown in Figure 1