Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Junte 3 Tabelas em Laravel

$data = DB::table('businesses')
            ->join('notes', 'notes.business_id', '=', 'businesses.id')
            ->join('businessimages', 'businessimages.business_id', '=', 'businesses.id')
            ->select('businesses.*', 'notes.note', 'businessimages.image')
            ->get();