@AlexanderKim use onDelete('cascade');, it's at the database level and less code to write in php.

$product->images()->delete(); this is when you need to delete all images but keep the product, or idk, nothing comes to my mind right now


Well, thank you

Please sign in or create an account to participate in this conversation.