-
-
Save sineld/4201432 to your computer and use it in GitHub Desktop.
Fulltext search with Laravel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function read_search($terms, $limit = 10) | |
{ | |
$contact_results = DB::query(" | |
select * | |
from contacts | |
where `account_user_id`=? | |
and `deleted`='0' | |
and `marketing`='0' | |
and `mass_merge`='0' | |
and match (`first`, `last`) against (?) | |
limit ? | |
", array(Auth::user()->account_user_id, $terms, $limit)); | |
return $contact_results; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment