Skip to content

Instantly share code, notes, and snippets.

@movibe
Forked from clouddueling/fulltextsearch.php
Last active August 29, 2015 14:19
Show Gist options
  • Save movibe/5f5af31da8cd516cdb77 to your computer and use it in GitHub Desktop.
Save movibe/5f5af31da8cd516cdb77 to your computer and use it in GitHub Desktop.
public static function read_search($terms, $limit = 20)
{
$contact_results = Contact::where_account_user_id(Auth::user()->account_user_id)
->where_deleted(0)
->where_marketing(0)
->where_mass_merge(0)
->raw_where("match (`first`, `last`) against (?)", array($terms))
->take($limit)
->get();
return $contact_results;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment