Level 4
Straight from the docs:
If a model has a non-null deleted_at value, the model has been soft deleted.
So basically this: $query->whereNotNull('deleted_at').
2 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
The model is using SoftDeletes trait.
Does anyone know how to manually query the deleted files?
I wanted to query the deleted data without using the withTrashed() or onlyTrashed() functions
Straight from the docs:
If a model has a non-null deleted_at value, the model has been soft deleted.
So basically this: $query->whereNotNull('deleted_at').
Please or to participate in this conversation.