GGeorge4IV's avatar

[Solved] Lumen/Factory Error: Unable to locate factory with name [default]

Fix: I still had use PlayerAccnt at top of the DatabaseSeeder.php file.

Original Post/Issue:

I am having trouble with factories. I changed the case of one the definitions in my ModelFactory file from:

$factory->define(App\PlayerAccnt::class, function ($faker) {

to

$factory->define(App\Playeraccnt::class, function ($faker) {

and now I am getting an error

"Unable to locate factory with name [default] [App\PlayerAccnt]".

When I change the case back in the ModelFactory.php file it works.

Ive tried clearing cache with "composer clear-cache", "composer dump-autoload", and "php artisan cache:clear" to no avail. Ive also deleted the database & recreated the migration as this is a testing environment for me to learn Lumen.

Any other suggestions (other than put it back to the original case ) ?

Thank you,

GGeorge4IV

0 likes
0 replies

Please or to participate in this conversation.