<?php

namespace App\Observers;

use Mtc\MercuryDataModels\VehicleOfferContent;

class VehicleOfferContentObserver
{
    public function deleting(VehicleOfferContent $content)
    {
        $content->load('subContent');
        $content->subContent->each(fn ($subContent) => $subContent->delete());
    }
}
