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
//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(); |
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 | |
/* | |
* Script: DataTables server-side script for PHP and MySQL | |
* Copyright: 2016 - Steven Lavoie | |
* Copyright: 2012 - John Becker, Beckersoft, Inc. | |
* Copyright: 2010 - Allan Jardine | |
* License: GPL v2 or BSD (3-point) | |
*/ | |
namespace Common\Utilities; |
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
//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(); |