In this lesson, let's look at an interesting example of a Factory class. I found an example on the spatie/freek.dev open-source repository, where they created a separate Factory class not in the database/factories
but in tests/factories
, mimicking the same behavior but with much more customized functions.
How That Factory Class is Used
The usage is similar to that of a regular Factory. New class initialization, then some type identical to how factories have states and...