Last Updated: 2023-12-03
I had the following in a test
<? php $advisor = factory(Advisor::class)->states('withUser')->make();
I briefly thought the call to
make() was weird, especially since I used
create elsewhere, but didn't investigate this.
An hour of debugging later, I realize the data was never persisted to the goddamn database since
make does not save anything (a fact I only realized then)
<? php $advisor = factory(Advisor::class)->states('withUser')->create();
Early in the debugging stage, start looking up the exact meanings of functions you are even slightly unsure about.