顾客管理

This commit is contained in:
TL 2022-06-29 20:52:12 +08:00
parent 6299ca7754
commit 911dbac5ca
2 changed files with 2 additions and 5 deletions

View File

@ -51,7 +51,7 @@ class CustomerController extends Controller
{
$data = [
'customer' => $customer,
'customer_groups' => CustomerGroupRepo::list(true),
'customer_groups' => CustomerGroupRepo::list(),
'_redirect' => $this->getRedirect(),
];

View File

@ -62,12 +62,9 @@ class CustomerGroupRepo
}
}
public static function list($onlyEnabled = false)
public static function list()
{
$builder = CustomerGroup::query();
if ($onlyEnabled) {
$builder->where('stauts', 1);
}
$groups = $builder->get();
return $groups;