Created
June 30, 2018 12:40
-
-
Save tilhom/625e022bb05fe4d0b49851544fc3f6f9 to your computer and use it in GitHub Desktop.
factory for Comment (for: Using Laravel 5.5 Resources to create your own {JSON:API} formatted API)
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
<?php | |
use Faker\Generator as Faker; | |
$factory->define(App\Comment::class, function (Faker $faker) { | |
return [ | |
'article_id' => $faker->numberBetween(1,200), | |
'author_id' => $faker->numberBetween(1,100), | |
'body' => $faker->text() | |
]; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment