Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel eloquent multiple join with where conditions

$users = User::join('posts', 'posts.user_id', '=', 'users.id')
            ->where('users.status', 'active')
            ->where('posts.status','active')
            ->get(['users.*', 'posts.descrption']);
Source by www.tutsmake.com #
 
PREVIOUS NEXT
Tagged: #laravel #eloquent #multiple #join #conditions
ADD COMMENT
Topic
Name
5+7 =