Closed
Description
Laravel Version
12.8.1
PHP Version
8.4.5
Database Driver & Version
No response
Description
When you have Model::automaticallyEagerLoadRelationships()
activated and use Redis for the cache backend and try to cache a model, then you get a Serialization of 'Closure' is not allowed
exception. This might happen with other cache drivers as well, but I haven't tested this. It works as expected as soon as you comment out Model::automaticallyEagerLoadRelationships()
.
Steps To Reproduce
- Install https://github.com/boris-glumpler/bug-report
- Run
php artisan serve
- Access the default route and see the exception
- Comment out
Model::automaticallyEagerLoadRelationships()
inAppServiceProvider
- Reload default route and see user data as expected
Metadata
Metadata
Assignees
Labels
No labels