Skip to content

Instantly share code, notes, and snippets.

@andreferraro
Last active August 29, 2015 14:25
Show Gist options
  • Save andreferraro/4204ed15b924f93fe90d to your computer and use it in GitHub Desktop.
Save andreferraro/4204ed15b924f93fe90d to your computer and use it in GitHub Desktop.
<?php
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding your
| database. Just tell the factory how a default model should look.
|
*/
$factory->define(App\User::class, function ($faker) {
return [
'name' => $faker->name,
'email' => $faker->email,
'password' => bcrypt(str_random(10)),
'remember_token' => str_random(10),
'role' => $faker->randomElement(['vendedor','suporte']),
];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment