Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

FisherTsau's avatar

Get fatal error when using "php artisan db:seed" after deploying the project

When I use "php artisan db:seed" in my localhost, it works well. However, after I deploy the project to DigitalOcean through Forge, an error was shown when I use the same command , "php artisan db:seed". Does anyone know what goes wrong here? Thanks up front!

The error message shown is: [Symfany\Component\Debug\Exception\FatalThrowableError] Fatal error: Class 'Faker\Factory' not found

0 likes
1 reply
ivan_zhuck's avatar
Level 1

Add this to composer.js file to "require" section:

        "fzaninotto/faker": "^1.5"

And run:

        composer update
1 like

Please or to participate in this conversation.