diff options
Diffstat (limited to 'database/factories')
-rw-r--r-- | database/factories/ModelFactory.php | 21 | ||||
-rw-r--r-- | database/factories/UserFactory.php | 23 |
2 files changed, 21 insertions, 23 deletions
diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php new file mode 100644 index 0000000..c0e4686 --- /dev/null +++ b/database/factories/ModelFactory.php @@ -0,0 +1,21 @@ +<?php + +/* +|-------------------------------------------------------------------------- +| 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. +| +*/ + +$factory->define(Api\Users\Model\User::class, function (Faker\Generator $faker) { + return [ + 'name' => $faker->name, + 'email' => $faker->safeEmail, + 'password' => bcrypt(str_random(10)), + 'remember_token' => str_random(10), + ]; +}); diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php deleted file mode 100644 index facf233..0000000 --- a/database/factories/UserFactory.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -use Faker\Generator as Faker; - -/* -|-------------------------------------------------------------------------- -| Model Factories -|-------------------------------------------------------------------------- -| -| 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. -| -*/ - -$factory->define(App\User::class, function (Faker $faker) { - return [ - 'name' => $faker->name, - 'email' => $faker->unique()->safeEmail, - 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret - 'remember_token' => str_random(10), - ]; -}); |