vendredi 2 octobre 2020

Join tables in Laravel Eloquent method

How to write this code in eloquent method ?

$product = DB::table('products')
             ->join('purchase', 'products.id', '=', 'purchase.id')
             ->join('sales', 'purchase.id', '=', 'sales.id')
             ->select('sales.*', 'purchase.*','products.*')
             ->get(); 


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire