update 12_27_2019

This commit is contained in:
franknstayn
2019-12-27 22:34:28 +08:00
parent 85a729f85d
commit 168c59f6cf
7 changed files with 885 additions and 27 deletions

View File

@@ -232,9 +232,30 @@ class AdminModel extends Model
return $i;
}
function selectSports(){
$i = DB::table('sports')
->orderby("SportsName", "ASC")
->get();
return $i;
}
function selectSportsCategory($id){
$i = DB::table('template_categories')
->where('TemplateId', $id)
->orderby("Category", "ASC")
->get();
return $i;
}
function selectStoreOrders(){
$i = DB::table('orders')->select('orders.*', 'orders.Id as Order_Id', 'payment_details.InvoiceNumber', 'payment_details.Currency', 'payment_details.Payer_Email', 'payment_details.Payer_Firstname', 'payment_details.Payer_Lastname', 'shipping_addresses.*')
->leftjoin('payment_details', 'payment_details.CartKey','=','orders.CartKey')
->leftjoin('shipping_addresses', 'shipping_addresses.PaymentDetail_Id','=','payment_details.Id')
// ->where('orders.StoreId', $store_id)
->orderby('orders.DateCreated', 'DESC')
->get();
return $i;
}
}