title: How to define a Laravel factory without a model?
body: <p>I'm controller testing and essentially want to define a <code>factory</code> to represent a post from the internet.  </p>
  
  <p>This post gets split up into several models in the controller. </p>
  
  <p>I'm functional testing the whole controller though so how do I create a <code>factory</code> without a model to represent a front end post?</p>
  
  <p>It appears <code>factory</code> are made like this:</p>
  
  <pre><code>$factory-&gt;define(App\Models\User::class, function (Faker\Generator $faker) {
  
  static $password;
  
  return [
      'name' =&gt; $faker-&gt;name,
      'email' =&gt; $faker-&gt;unique()-&gt;safeEmail,
      'password' =&gt; $password ?: $password = bcrypt('secret'),
      'remember_token' =&gt; str_random(10),
      ];
  });
  </code></pre>
  
  <p>Its the <code>App\Models\User::class</code> that's throwing me. I want a generic one that's not tied to the <code>User</code> model or any model.</p>