Class 'UserTableSeeder' does not exist - Laravel 5.0 [php artisan db:seed]

前端 未结 4 994
无人共我
无人共我 2020-12-24 01:05

I\'m trying a basic php artisan db:seed after migrating my database but it keeps returning the title error in cmd -[ReflectionException] Class \'UserTableSeeder\' does not e

4条回答
  •  清歌不尽
    2020-12-24 01:40

    Sometimes the code is correct but you need to run the following command in order to run the seeder command. First Run this command

    composer dumpautoload
    

    Then seed the seeder

    php artisan db:seed --class=CreateUsersTable
    

    I hope it will work

提交回复
热议问题