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

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

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

javascript - Restarting Supervisor and effect on FlaskSocketIO -