php - Laravel select subquery -
i'm rather stuck trying figure out how can run single query database rather fetching results using 1 query executing other.
$query->wherein('page_user_id', staff::lists('staff_id'));
thanks help
$query->join('staff', 'staff.staff_id', '=', 'user.page_user_id')->get();
i think help. reference http://laravel.com/docs/5.1/queries
Comments
Post a Comment