Created
June 30, 2018 12:37
-
-
Save tilhom/5e5c7d5d1ec29edf698b3cc35236183a to your computer and use it in GitHub Desktop.
factory for People (for: Using Laravel 5.5 Resources to create your own {JSON:API} formatted API)
This file contains hidden or 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\People::class, function (Faker $faker) { | |
return [ | |
'first_name' => $faker->firstName, | |
'last_name' => $faker->lastName, | |
'twitter' => '@'.$faker->userName | |
]; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment