You can disable lazy loading using Model::preventLazyLoading()
- ·
- Telegram
- ·
- Newsletter
🔥 #Laravel Tip: Protect your database from the dangers of lazy loading by disabling it in your Laravel app. You can also customise how violations are handled, which is perfect for models outside of your control e.g. within packages.