Last active
May 7, 2018 02:36
-
-
Save tisuchi/ad5b3bb0c31a97b2800785e1110101fe to your computer and use it in GitHub Desktop.
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
<?php | |
$sentence = 'This is my search keyword'; | |
DB::select(DB::raw("SELECT *, MATCH(body) AGAINST('$sentence') as score | |
FROM articles | |
WHERE MATCH(body) AGAINST('$sentence')")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment