In a previous video, I talked about one aspect of Eloquent strictness checks: lazy loading.
In today's video, I want to show a surprising issue with another strictness check: missing attribute access.
When working with factory-generated data in a test, you might get an exception with this strictness check, when you really wouldn't expect one.
Let's see why it works this way, and how to prevent it from making our tests fail.
And after watching, don't forget to subscribe to our YouTube channel, so you don't miss future videos.
Here to help,
Joel
P.S. Eloquent strictness is one easy way to get more confident with your code. Ash has published a helpful guide with many more tips to make your Laravel apps "battle ready".