Level 70
4 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
What is the difference between destroy() and delete()
please explain to me, when should i use one of them.
destroy() takes a key to a model for example destroy($product->id)
delete() is used in two different ways;
a) when you are querying for example Product::where('supplier_id,'=',null)->delete()
b) applied directly to a model for example $product->delete()
Please or to participate in this conversation.