I am making a search widget. when i am searching i am taking results from 2 api's one is from yelp and other is from another source. but this process is taking a longer time
$dataProvider = SearchUtil::locallookup($for, $near); //local api
$content=SearchUtil::yelplookup($for,$near); //yelp api
$array=array_merge($dataProvider,$content);
Is there any way by which i can call both this api's together? i dont want the yelp api to be called after the first api gives result. i want to call both of them together.
Is there any way to do this ?