src/Traits/Tenantable.php
public function syncTenants($tenants, bool $detaching = true)
    {
        // Find tenants
        $tenants = $this->prepareTenantIds($tenants);

        // Sync model tenants
        $this->tenants()->sync($tenants, $detaching);

        return $this;
    }
public function syncTenants($tenants, bool $detaching = true)
    {
        // Find tenants
        $tenants = $this->prepareTenantIds($tenants);

        // Sync model tenants
        $this->tenants()->sync($tenants, $detaching);

        return $this;
    }
public function syncTenants ( $ tenants , bool $ detaching = true ) { // Find tenants $ tenants = $ this -> prepareTenantIds ( $ tenants ) ; // Sync model tenants $ this -> tenants ( ) -> sync ( $ tenants , $ detaching ) ; return $ this ; }
Sync model tenants.

@param mixed $tenants
@param bool  $detaching

@return $this
Sync model tenants .