src/services/Customers.php
public function deleteCustomerById($id): bool
    {
        $record = CustomerRecord::findOne($id);

        if ($record) {
            return (bool)$record->delete();
        }

        return false;
    }
public function deleteCustomerById($id): bool
    {
        $record = CustomerRecord::findOne($id);

        if ($record) {
            return (bool)$record->delete();
        }

        return false;
    }
public function deleteCustomerById ( $ id ) : bool { $ record = CustomerRecord :: findOne ( $ id ) ; if ( $ record ) { return ( bool ) $ record -> delete ( ) ; } return false ; }
Delete a customer by it's id.

@param int $id The id

@return bool
@throws \Throwable in case something went wrong when deleting.
Delete a customer by it s id .