public function results(Request $request) { $services = Service::name($request->get('query'))->orderBy('created_at', 'DESC')->get(); $materials = Material::name($request->get('query'))->orderBy('created_at', 'DESC')->get(); $results = $materials->merge($services); return view('results')->with('results', $results)->with('title', $request->get('query')); }