Category: Laravel
-
Post Views: 15 1. The request parameters are as follows, you need to ensure the uniqueness of logistics_freight_no in the table. Since batch overriding writes are supported, the final implementation is to clear all records of RETURN_ORDER_ID of 28, and then rewrite them all. 2. The verification rules are implemented as follows 3. When there is a duplicate value in…
-
Post Views: 17 1. The implementation at this stage is as follows. The final generated SQL will always need to be associated with several other tables, otherwise an error will be reported. 2. The adjusted implementation is as follows. After preparing new request($criteria), then judge whether to join, and the generated sql is associated with other tables on demand, which…
-
Post Views: 17 1. In Laravel 9, an error is reported: call to undefined method illuminate\\http\\resources\\missingValue::isempty(). as shown in Figure 1 2. Check the code implementation 3. Print $this->whenloaded(Customtagsenable), the result is as follows, which are the results of the resource after the model association is not loaded, and the resource after the model association is loaded 4. Re-implement the…
-
Post Views: 20 1. When there are multiple rows of data in the table, the implementation is as follows. Error: call to a member function value() on null. as shown in Figure 1 2. The adjustment is realized as follows. When the record does not exist, the query result is NULL. When the record exists, the query result is int(6),…
-
Post Views: 18 1. Job runs an error in Laravel 9: Has Been Attempted too many times or run too long. The job may have previously previously timed out.. as shown in Figure 1 2. The total number of records found in the table is 8761297. Based on the chunk method, the entire table is retrieved in units of 10…
-
Post Views: 23 1. Try to pass multiple fields/values based on the Redis facade Hset, the code is implemented as follows 2. Error during operation: local.error: err wrong number of arguments forhsetcommand. as shown in Figure 1 3. However, starting from Redis 4.0, HSET can set one or more field/value pairs at a time. Since Redis 4.0.0, HMSET is discarded,…
-
Post Views: 21 1. Reference:In Laravel 9, reuse Spatie\QueryBuilder\QueryBuilder in asynchronous queue to generate query SQL 2. The current implementation scheme, for a certain field, can only use one filter, or partial, or Exact. Reference:In Yii 2.0, implement the request parameter form of the filter. 3. For a single fuzzy search, multiple accurate search fields, decide to verify the type…
-
Post Views: 15 1. When using native expression query in Laravel 9, an error is reported: SQLState[42000]: Syntax error or access Violation: 1064 you have an error in your SQL syntax;. The reason should be with Hannah OConno is related. in it. as shown in Figure 1 2. Reference:In condition for multiple fields when using native expression query in Laravel…
-
Post Views: 16 1. The current request parameter structure is as follows. Prepare to verify config[‘appoint_country’][‘appoint_country’][‘value’][0], config[‘appoint_country’][‘appoint_country’][‘value’][1]. as shown in Figure 1 2. The verification code is implemented as follows. Try to verify that the maximum length of the value in the index array is 1. Validation failed, as expected. as shown in Figure 2 3. Specify a custom message…