<?php

namespace App\Traits\Product\Service;

use App\Models\Product;

trait DeletesProducts
{
    /**
     * Completely delete a product and its physical images.
     */
    public function deleteProduct(Product $product)
    {
        // Clean up physical files first (from HandlesProductImages Trait)
        $this->removeExistingImages($product);
        
        // Delete product from Database
        $product->delete();
    }
}