--- title: 'You can set model attributes on factories using the set() method' tweet_id: '1517561132222844928' thread_slug: weekly-thread-2022-16 author_username: justsanjit images: - 'https://pbs.twimg.com/media/FQVWw4oXIAAV6Fv.jpg' created_at: 2022-04-22T17:49:03+00:00 slug: 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.