hello thank you for this course,
I am trying to implement this code "preventLazyLoading" but the query "$user->posts " is executed without the errors.
I have written the same code in the article https://laravel-news.com/disable-eloquent-lazy-loading-during-development
I can't catch error LazyLoadingViolationException
I looked at https://laravel.com/docs/master/eloquent-relationships#lazy-eager-loading and I couldn't prevent lazy loading.
Do you have an idea about this
laravel v9.19
hello thank you for this course, I am trying to implement this code "preventLazyLoading" but the query "$user->posts " is executed without the errors. I have written the same code in the article https://laravel-news.com/disable-eloquent-lazy-loading-during-development I can't catch error LazyLoadingViolationException I looked at https://laravel.com/docs/master/eloquent-relationships#lazy-eager-loading and I couldn't prevent lazy loading. Do you have an idea about this laravel v9.19
Not sure, I can't "blindly" guess what you did wrong. Maybe your environment is production, that's why preventing doesn't work?