📜  Laravel - 查询生成器左连接 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:57.630000             🧑  作者: Mango

代码示例3
$result = DB::table('pos_cash_register_open')
            ->select('pos_cash_register_open.outlet_id','pos_outlets.*')
            ->leftjoin('pos_outlets', 'pos_cash_register_open.outlet_id', '=', 'pos_outlets.id')
            ->groupBy('pos_cash_register_open.outlet_id')
            ->get();