Reputation: 169
Why it's impossible to create dummy data in unit testing like below?
DB::table('users')->insert([
[
'name' => 'test',
],
I saw that in order to create data you need to create factory, but when I try to insert data like this:
User::factory()->count(1)->create([
'name' => 'test'
]);
It also don't insert new data. What is the easiest way to to that? Thank you
Upvotes: 0
Views: 624