-
Couldn't load subscription status.
- Fork 232
Closed
Description
Describe the bug
It seems like there is an issue with soft delete. If model using soft delete and result of NOT deleted query is cached, library will ignore global scoping of soft delete scope for the model which will result in wrong return.
Eloquent Query
The following will not find a deleted item
Book::withTrashed()->find($id)However the following WILL find the deleted item
Book::whereNotNull('deleted_at')->find($id)Stack Trace
Environment
- PHP:7.2
- OS: Debian stretch
- Laravel: 5.8
- Model Caching: 0.4.11