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']);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #join #multiple #tables #laravel #eloquent
ADD COMMENT
Topic
Name
7+2 =