fix some handling 3

This commit is contained in:
2026-07-08 12:45:14 +03:30
parent 5781d5bf53
commit a4e98d8047
6 changed files with 311 additions and 61 deletions
+4 -4
View File
@@ -146,10 +146,10 @@ class Product extends Model
}
try {
static::$orderLimitColumnsExist = Schema::hasColumn(
(new static)->getTable(),
'order_limit_enabled'
);
$table = (new static)->getTable();
static::$orderLimitColumnsExist = Schema::hasColumn($table, 'order_limit_enabled')
&& Schema::hasColumn($table, 'min_order_cash')
&& Schema::hasColumn($table, 'max_order_cash');
} catch (\Throwable) {
static::$orderLimitColumnsExist = false;
}