The Benefits of Minimal Factories in Laravel
Laravel factories are a huge time-saver when writing tests. In the past, I’d build a factory to include every model property in the default state, but lately I’ve switched to having minimal factories by default. I’ll explain my reasons for this change, and what benefits I’ve found.