📜  在第 1 行的 Psy Shell 代码中调用未定义的函数 factory() - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:35.135000             🧑  作者: Mango

代码示例1
In Laravel 8, the factory helper is no longer available. Your Thread model 
class should use `HasFactory` trait, then you can use your factory like this:

Thread::factory()->count(50)->create();

For more : https://laravel.com/docs/8.x/database-testing#creating-models