Exemplo n.º 1
0
 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'));
 }
Exemplo n.º 2
0
 public static function filter($name)
 {
     return Service::name($name)->orderBy('name', 'ASC')->paginate(10);
 }