mirror of
https://github.com/brunofontes/shareit.git
synced 2025-11-15 16:00:54 -03:00
Including first Laravel UnitText Experience
These changes will stay here so I can use them as examples to come back later to include some real tests.
This commit is contained in:
@@ -21,3 +21,12 @@ $factory->define(App\User::class, function (Faker $faker) {
|
||||
'remember_token' => str_random(10),
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(App\Product::class, function (Faker $faker) {
|
||||
return [
|
||||
'name' => $faker->sentence,
|
||||
'user_id' => function () {
|
||||
return factory(App\User::class)->create()->id;
|
||||
},
|
||||
];
|
||||
});
|
||||
Reference in New Issue
Block a user