<?php

namespace App\Observers;

use Mtc\MercuryDataModels\DealershipContent;

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