Skip to content

Instantly share code, notes, and snippets.

View yong0011's full-sized avatar

Chanon Sae-lee yong0011

  • Bangkok, Thailand
View GitHub Profile
@yong0011
yong0011 / autocomplete.php
Created July 21, 2016 10:12 — forked from imranismail/autocomplete.php
Laravel And JqueryUI's Autocomplete Plugin
//SearchController.php
public function autocomplete(){
$term = Input::get('term');
$results = array();
$queries = DB::table('users')
->where('first_name', 'LIKE', '%'.$term.'%')
->orWhere('last_name', 'LIKE', '%'.$term.'%')
->take(5)->get();