Laravel, Call to undefined function Database\Seeders\factory()

后端 未结 5 1516
说谎
说谎 2021-01-05 07:46

I get the title error when I run command:

php artisan db:seed

My screenshot:

I have no idea where this problem comes from. I was sear

5条回答
  •  既然无缘
    2021-01-05 08:30

    Try to change

    factory(App\Models\Article::class, 30)->create();
    

    to

    App\Models\Article::factory()->count(30)->create();
    

提交回复
热议问题