Level 102
Show the output of
$data = Table1::selectRaw("COALESCE(table1.name, 'empty') AS name")
->leftJoin("table2", "table1.id", "=", "table2.id")
->dd()
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have the following join query:
$data = Table1::selectRaw("COALESCE(table1.name, 'empty') AS name")
->leftJoin("table2", "table1.id", "=", "table2.id")
->get()
I specifically chose the name from table 1 yet I still get ambiguous column error
Why?
Please or to participate in this conversation.