Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

join multiple tables in laravel eloquent

$users = User::join('posts', 'posts.user_id', '=', 'users.id')
            ->where('users.status', 'active')
            ->where('posts.status','active')
            ->get(['users.*', 'posts.descrption']);
 
PREVIOUS NEXT
Tagged: #join #multiple #tables #laravel #eloquent
ADD COMMENT
Topic
Name
1+1 =