I am trying to select rows from table students using laravel query for searching but on searching it's returning all rows from table.
$data = DB::table('students')->select(['name', 'username'])->where('institute', $inst)->where('username', 'LIKE', '%'.$search.'%')->orWhere('name', 'LIKE', '%'.$search.'%')->orWhere('email', 'LIKE', '%'.$search.'%')->orWhere('contact', 'LIKE', '%'.$search.'%')->orderBy('id', 'DESC')->paginate(10);
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3jtT23W
via IFTTT
Aucun commentaire:
Enregistrer un commentaire