If you want to select columns from related tables like this you have to join the tables manually - doing with() does not work for this. Also, when selecting from another table you need to add the other table in front of the column, i.e. get(['other_table.column'])
anlutro, do mean something like this?
That should work, yes. You can also replace DB::table(..)->
with Model::
How would I specify ('invoice AS i') if I switch DB::table(..)-> with Model:: ?
hodaddy said:
How would I specify ('invoice AS i') if I switch DB::table(..)-> with Model:: ?
have you try Invoice:: ?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community