I need to execute 3 quires when user comes to main page.
public function index()
{
$slider = \App\Slider::select("title", "poster", "link", "sub_title")->translate()->orderBy("created_at", "asc")->get();
$services = \App\Page::getPage(24)->tabs()->translate()->get();
$partners = \App\Partner::select('id', 'title', 'link')->translate()->get();
return view('Front/index', compact('slider', 'services', 'partners'));
}
as you can see, I need to get images from slider, take page data and take some company partners info. so i execute 3 quires to get what i want. is there way to make only one query and union all these 3 quires in one? I want something like multi_query
function in php. no matter it would be in eloquent or query builder.
p.s. I don't eloquent relationships, these data aren't related to each other