How to force eager load in Laravel
You can force your app to eager load in Laravel using this method in the Service Provider. This code will throw an exception if you don’t eager load a relationship (except in production).
You can force your app to eager load in Laravel using this method in the Service Provider. This code will throw an exception if you don’t eager load a relationship (except in production).