I would like to query multiple tables from multiple databases.
My first query should return an array of sites_id.
The second request should return manufacturers_id based on the sites_id returned in the first request.
How do I set this up?
My repository:
public function getSitesImminence()
{
$arraySites = PublicationSite::
select('sites_id')
->where('publi_code', '=', 'imminence_intercab')
->where('publi_status', '>', '0')
->get();
return $arraySites;
}
public function getManufacturersMls($arraySites){
$arrayManufacturers = Site::
select('manufacturers_list')
->where('sites_id', '=', $arraySites)
->get();
return $arrayManufacturers;
}
My controller:
$toto = $siteRepository->getSitesImminence()->getManufacturersMls($arraySites);
My error:
Method getManufacturersMls does not exist.