added search for teamstore
This commit is contained in:
@@ -286,11 +286,35 @@ class TeamStoreModel extends Model
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectRoster($productId){
|
||||
function selectRoster($productId)
|
||||
{
|
||||
|
||||
$i = DB::table('roster')
|
||||
->where("ProductId", $productId)
|
||||
->get();
|
||||
->where("ProductId", $productId)
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
|
||||
function filterTeamstoreProducts($field1, $value1, $field2, $value2)
|
||||
{
|
||||
|
||||
$i = DB::table('teamstore_products')
|
||||
->where($field1, $value1)
|
||||
->where('PrivacyStatus', 'public')
|
||||
->orderBy($field2, $value2)->get();
|
||||
// ->orderBy('Ordering', 'ASC')->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function searchTeamstoreProducts($field1, $value1, $field2, $value2, $keyword)
|
||||
{
|
||||
$i = DB::table('teamstore_products')
|
||||
->where($field1, $value1)
|
||||
->where('PrivacyStatus', 'public')
|
||||
->where("ProductName", "LIKE", "%$keyword%")
|
||||
->orderBy($field2, $value2)->get();
|
||||
// ->orderBy('Ordering', 'ASC')->get();
|
||||
return $i;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user