Laravel migrations: Class “not found”

前端 未结 16 1439
自闭症患者
自闭症患者 2020-12-12 14:38

I am deploying a Laravel barebone project to Microsoft Azure, but whenever I try to execute php artisan migrate I get the error:

[2015-06-13

相关标签:
16条回答
  • 2020-12-12 15:34

    i also run in the same problem.

    The solution for me was to delete the migration file, AND delete the record from the "migrations" table in the database.

    After that, I ran

    composer dump-autoload

    and was finally able to reset/rollback migrations.

    0 讨论(0)
  • 2020-12-12 15:34

    i face this problem when i rename migrations to :

    0_create_activities_table.php

    i solve it when i rename it to:

    2019_10_01_0_create_activities_table.php

    0 讨论(0)
  • 2020-12-12 15:35

    I deleted one of the migration file. faced the same problem, while php artisan migrate:rollback

    Then I tried composer dump-autoload. Again the same turned up.

    I restored the deleted file and tried composer dump-autoload and php artisan migrate:rollback. It works.

    0 讨论(0)
  • 2020-12-12 15:40

    I was receiving the same class not found error when trying to migrate my project. Sometimes it is the simple things that get you. In my case, I noticed that my class name was not correct in my migration file due to me making a rename change early on and not carrying that change throughout.

    After correcting the class name I performed a composer dump-autoload and my issue went away.

    HTH someone :]

    0 讨论(0)
提交回复
热议问题