Created
November 4, 2017 06:39
-
-
Save vineeth030/8ae2557e428f7c1debe9bd19720c0f4d to your computer and use it in GitHub Desktop.
Model factories for relationship seeding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$factory->define(App\Student::class, function (Faker\Generator $faker) { | |
return [ | |
'name' => $faker->name, | |
'marks' => $faker->numberBetween(0,100), | |
]; | |
}); | |
$factory->define(App\Teacher::class, function (Faker\Generator $faker) { | |
return [ | |
'name' => $faker->name, | |
'phone' => $faker->phoneNumber, | |
]; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment