This commit is contained in:
ludo
2025-02-15 12:12:42 +01:00
parent d1cc62c9b1
commit 592402a6c1
53 changed files with 1098 additions and 404 deletions

View File

@@ -9,6 +9,13 @@ class CustomerSaleChannels
{
use Basic;
public static function createByCustomer($customerId)
{
$customer = Customers::get($customerId);
return $customer->sale_channels()->sync(SaleChannels::getDefault());
}
public static function destroyByCustomerAndSaleChannel($customerId, $saleChannelId)
{
return CustomerSaleChannel::byCustomer($customerId)->bySaleChannel($saleChannelId)->delete();