Laravel join query example


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


Laravel join query example

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

Advertisements

Add Comment

📖 Read More