Php versions – Trying to write a function that if product exists, then specific category cannot be deleted
I'm working on an ecommerce project in Laravel 10.48.8, my PHP version is 8.2.12. I have used one to many relation to link the parent table categories to one of the child table products using foreign key in delete cascade.…