Browse Source

rename ModelFactory to UserFactory to encourage separate files

Taylor Otwell 7 years ago
parent
commit
67a8a11570
1 changed files with 7 additions and 4 deletions
  1. 7 4
      database/factories/UserFactory.php

+ 7 - 4
database/factories/ModelFactory.php → database/factories/UserFactory.php

@@ -1,18 +1,21 @@
 <?php
 
+use App\User;
+use Faker\Generator as Faker;
+
 /*
 |--------------------------------------------------------------------------
 | Model Factories
 |--------------------------------------------------------------------------
 |
-| Here you may define all of your model factories. Model factories give
-| you a convenient way to create models for testing and seeding your
-| database. Just tell the factory how a default model should look.
+| This directory should contain each of the model factory definitions for
+| your application. Factories provide a convenient way to generate new
+| model instances for testing / seeding your application's database.
 |
 */
 
 /** @var \Illuminate\Database\Eloquent\Factory $factory */
-$factory->define(App\User::class, function (Faker\Generator $faker) {
+$factory->define(User::class, function (Faker $faker) {
     static $password;
 
     return [