1. Редактор карты зала.
This commit is contained in:
miroman-afk
2022-10-27 15:48:02 +03:00
parent 0e5f2002b1
commit 4d3ad7727d
21 changed files with 625 additions and 192 deletions

View File

@@ -43,4 +43,20 @@ class Dishes extends Model {
}
return $isReal;
}
public static function isServing($data) {
$dish_isServing = Dishes::where('code', $data)->where('is_history', 0)->first();
$isServing = 0;
if ($dish_isServing) {
$isServing = intval($dish_isServing['is_serving']);
} else {
$dish_isServing = Dishes::where('code', $data)->where('is_history', 1)->first();
if ($dish_isServing) {
$isServing = intval($dish_isServing['is_serving']);
} else {
$isServing = 0;
}
}
return $isServing;
}
}