Loading…

How to use join in laravel?

Example

                                        
DB::table('admin')
            ->join('contacts', 'admin.id', '=', 'contacts.user_id')
            ->join('orders', 'admin.id', '=', 'orders.user_id')
            ->select('users.id', 'contacts.phone', 'orders.price')
            ->get();

Suggest An Answer

No suggestions avaliable!

Latest post from Laravel Interview Questions

Ask Question