Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Laravel 5.2 - Suchfunktion

$users = DB::table('MyTable')
         ->where('id', 'LIKE', '%MySearch%')
         ->or_where('firstname', 'LIKE', '%MySearch%')
         ->or_where('lastname', 'LIKE', '%MySearch%')
         ->or_where('email', 'LIKE', '%MySearch%')
         ->or_where('address', 'LIKE', '%MySearch%');
         ->get();