Why use raw?
I do stuff like this at times:
$makes = DB::table('produced')
->select(
'produced.*',
'catalog.*',
'productions.*',
'customers.name as customer'
)
->leftJoin('catalog', 'produced.catalog_id', '=', 'catalog.id')
->leftJoin('productions', 'produced.production_id', '=', 'productions.id')
->leftJoin('customers', 'productions.customer_id', '=', 'customers.id')
->where('packed', '=', 0)
->where('flagged', '=', 0, 'AND')
->groupBy('production_id')
->get();
OH! Maybe you are missing:
get()
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community