added delete visualizer

This commit is contained in:
franknstayn
2020-01-07 22:29:12 +08:00
parent 82385d57da
commit ed4227bd05
5 changed files with 622 additions and 3 deletions

View File

@@ -311,11 +311,62 @@ class AdminModel extends Model
->get();
return $i;
}
function selectOrder($field, $value){
$i = DB::table('orders')
->where($field, $value)
->get();
return $i;
}
function editVisualizer($id){
$i = DB::table('templates')
->where('Id', $id)
->get();
return $i;
}
function deleteVisualizer($id){
$i = DB::table('templates')
->where("Id", $id)
->delete();
return $i;
}
function deleteDefaultBodyColor($tempCode){
$i = DB::table('template_body_colors')
->where("TemplateCode", $tempCode)
->delete();
return $i;
}
function deleteTemplatePath($tempCode){
$i = DB::table('template_paths')
->where("TemplateCode", $tempCode)
->delete();
return $i;
}
function deleteDefaultTrimColor($tempCode){
$i = DB::table('template_trim_colors')
->where("TemplateCode", $tempCode)
->delete();
return $i;
}
function deletePrintPatternList($tempCode){
$i = DB::table('print_pattern_list')
->where("TemplateCode", $tempCode)
->delete();
return $i;
}
}