Laravel left join query example


Laravel left join query example : DB::table(‘table_name’)->leftJoin(‘condition’)->select(‘column_names’)->get(); is used for join in laravel.


Laravel left join query example

DB::table('users')
          ->leftJoin('city','city.user_id','=','users.id')
          ->select('users.name','city.city_name')
         ->get();

Advertisements

Add Comment

📖 Read More