Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法按组名获取(或设置)客户组?像客户组的 loadByAttribute 之类的东西,还是我需要对所有客户组进行凝胶化并按名称过滤它们?
谢谢, 科尔库特
从组名中获取组 id
对于过滤,您可以使用 ->addAttributetoFilter('group_id',..);
如果要获取客户组 id 加载客户 $customer->getGroupID();