#Error or delay in deleting models with Eloquent

8 messages · Page 1 of 1 (latest)

glacial lodge
#

Here in $payments = $customer->payments()->get(); the model deleted in Payment::destroy($currentPayment->id); is returned.

#

In fact it is not deleted.

red saffron
glacial lodge
red saffron
#

you mean softDeletes?

glacial lodge
#

Sorry, I thought I could delete the post, but that just deleted the error message.

Old message:
Hi.
I have code that basically finds a model, deletes it and finds other models of the same type.
The problem is that after deleting the model, sometimes the deleted model is returned in the queried list._

red saffron
#

am confused, but am glad you found the solution

glacial lodge