Skip to content

Instantly share code, notes, and snippets.

@winni4eva
Last active January 13, 2019 16:41
Show Gist options
  • Save winni4eva/527e29150b13d4c90bb50ed78f4853c5 to your computer and use it in GitHub Desktop.
Save winni4eva/527e29150b13d4c90bb50ed78f4853c5 to your computer and use it in GitHub Desktop.
Factories
<?php
use Faker\Generator as Faker;
$factory->define(App\User::class, function (Faker $faker) {
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'email_verified_at' => now(),
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
'remember_token' => str_random(10),
];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment