Tag: Eloquent
-
Post Views: 20 1. Table TABLE_A is in the A database, and the table TABLE_B is in the B database. The two tables are linked together via columns table_a.id , table_b.table_a_id . 2. Refer to the advanced JOIN statement:https://learnku.com/docs/laravel/6.x/queries/5171#211e4f. Reference:https://stackoverflow.com/questions/41423603/join-two-mysql-tables-in-different-databases-on-the-same-server-with-laravel-elo. as shown in Figure 1 3. The final code is as follows 4. The final generated SQL is as follows,…
-
Post Views: 20 1. In the API response, the field: “Processing”: False, . as shown in Figure 1 2. The type of field processing is tinyint(1). Its value is 0, 1. as shown in Figure 2 3. The original implementation is as follows 4. The $casts property in the model provides a convenient way to convert attributes to common data…
-
Post Views: 19 1. The existing code is implemented as follows 2. The interface response structure is as follows, as shown in Figure 1 3. It is expected to put some fields in the field Theme_Installation into the first level, that is, level with the ID, and finally delete the Theme_Installation. 4. The final implementation code is as follows 5.…
