Sep 8, 2017
0
Level 1
Translate Laravel DB::raw() query with join to Eloquent
hello every one please can some one help me with the equivalent of this query in Eloquent? I'm using Laravel 5.4
SELECT stock_id, prod_id, prix , priority FROM stock as stock INNER JOIN (SELECT * FROM products WHERE sold=false AND brand_id='brand_id') as product ON stock.stock_id = product.id Order By stock.priority;
Please or to participate in this conversation.