Esempio n. 1
0
 /**
  * Display the research results.
  *
  * @return Response
  */
 public function searchable(Request $request)
 {
     $query = $request->q;
     $societe = Societe::search($query)->with('contacts')->get();
     $contacts = $contact = Contact::search($query)->get();
     $type = 0;
     $tri = 'none';
     $actif = 'contact';
     // foreach ($societe as $key => $value) {
     // 	var_dump($value->nom_contacts);
     // }
     // dd();
     return view('contact.contact', compact('actif', 'societe', 'type', 'tri', 'query'));
 }
 /**
  * Get contacts.
  *
  * @return Json array
  */
 public function search(Request $request)
 {
     return Contact::search($request['searchKey'])->get();
 }