added announcement

This commit is contained in:
franknstayn
2020-10-17 22:17:25 +08:00
parent da89856e95
commit d82832043c
8 changed files with 279 additions and 3 deletions

View File

@@ -348,4 +348,24 @@ class UserModel extends Model {
$row = $query->fetchAll(\PDO::FETCH_OBJ);
return $row;
}
function getAnnouncement($storeId){
$i = DB::table('store_announcement')
->where('StoreId', $storeId)
->get();
return $i;
}
function saveNewAnnouncement($data){
$i = DB::table('store_announcement')
->insert($data);
return $i;
}
function updateAnnouncement($id, $data){
$i = DB::table('store_announcement')
->where('Id', $id)
->update($data);
return $i;
}
}