You can set model attributes on factories using the set() method

You can set model attributes on factories using the set() method

#Laravel 9.8.0 adds a set() model factory method that allows you to set a single model attribute.

We're writing a book, you can get it for free here.