PHP Fatal error: Call to undefined function factory() in Psy Shell code on line 1, LARAVEL 8 Issue solved
$ php artisan tinker
>>> User::factory()->count(100)->make();
PHP Fatal error: Call to undefined function factory() in Psy Shell code on line 1, LARAVEL 8 Issue solved
$ php artisan tinker
>>> User::factory()->count(100)->make();
Call to undefined function factory() in Psy Shell code on line 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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us