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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -