add search for teamstores

This commit is contained in:
Frank John Begornia
2019-08-23 20:50:15 +08:00
parent b7e81adf31
commit f8d033f3fa
4 changed files with 121 additions and 13 deletions

View File

@@ -9,7 +9,8 @@ class TeamStoreModel extends Model {
{
$i = DB::table('teamstores')
->where("IsActive", "true")
->get();
->orderBy('Id', 'DESC')
->paginate(16);
return $i;
}
@@ -190,5 +191,24 @@ class TeamStoreModel extends Model {
->update($data);
return $i;
}
function selectTeamstoreSearch($field, $value, $keyword){
$i = DB::table('teamstores')
->where("StoreName", "LIKE","%$keyword%")
->where("IsActive", "true")
->orderby($field, $value)
->paginate(16);
return $i;
}
function selectTeamstoreFilter($field, $value){
$i = DB::table('teamstores')
->where("IsActive", "true")
->orderby($field, $value)
->paginate(16);
return $i;
}
}