-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
I trying to follow the tutorial at https://laracasts.com/lessons/whats-new-in-testdummy by @JeffreyWay
When i have code as
$factory('App\User',[
'name' => $faker->name,
'email' => $faker->email,
'password'=> bcrypt('Passw0rd')
]);
$factory('App\Post',[
'title' => $faker->name,
'user_id' => 'factory:App\User'
]);
and my DatabaseSeeder.php
<?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
$this->call(PostTableSeeder::class);
Model::reguard();
}
}
Now the issue is in database i can see there are many users created in database.
Metadata
Metadata
Assignees
Labels
No labels