DEV Community

Discussion on: 23+ Laravel Interview Questions (Answered) You Should Know

Collapse
 
sambenne profile image
Sam Bennett

Wouldn't you just use the SoftDeletes Trait? It seems pointless to use scopes to do soft deletes. Plus the question says how to do Soft Deletes but does not show anything to do with it. That would be a fail in my books and would show the person can't read.

Thread Thread
 
dansilcox profile image
Dan Silcox

Fair enough - I must admit I don't do Laravel on a daily basis so wasn't aware of the SoftDeletes trait - was just working out from the context of the OP's article that they were implying scopes could be used for soft deletes...