title: In Laravel, how do I retrieve a random user_id from the Users table for Model Factory seeding data generation?
body: <p>Currently, in my ModelFactory.php, I have:</p>
  
  <pre><code>$factory-&gt;define(App\Reply::class, function (Faker\Generator $faker) {
    return [
      'thread_id' =&gt; 1,
      'user_id' =&gt; 1,
      'body' =&gt; $faker-&gt;paragraph
    ];
  });
  </code></pre>
  
  <p>I would like to generate a random user_id from one of the user ID's already stored in the user table. I'm stumped because I don't know the way to display data output to code properly, and I was wondering how I would be able to allow Laravel to choose a random user ID and insert into the database. Thank you! :)</p>