Answers for "model select and join in laravel"

PHP
1

select selected fields in laravel join

->select('accounts.*', 'users.id as uid','users.user_name');
Posted by: Guest on May-01-2021
3

join in laravel eloquent

$customer = DB::table('customers')
                ->join('shops', 'customers.shop_id', '=', 'shops.shop_id')
                ->where('customer_contact', $contact_no)
                ->get();
Posted by: Guest on October-06-2020

Browse Popular Code Answers by Language