Laravel correlation table flattened output

problem description

does Laravel have its own internal method to flatten the output of the associated table and the original table:
[

]
"a" => "1",
"b" => "2",
"c" => [
    "d" => 3,
    "e" => 4,
] 

]

[

]
"a" => "1",
"b" => "2",
"d" => 3,
"e" => 4,

]
remove the associated table c and read out the fields directly

Thank you

Nov.09,2021

you can use the converter


array_flatten () to flatten the output, but return an indexed array.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e55167-438b4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e55167-438b4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?