Home  >  Q&A  >  body text

Laravel got an error when re-executing php artisan make:migration

Laravel re-executed php artisan make:migration when error:


$ php artisan make:migration create_articles_table


  [ErrorException]
  include(D:\wnmp\www\laravel-5-3-dev\vendor\composer/../../database/migratio
  ns/2016_11_27_181313_create_articles_table.php): failed to open stream: No
  such file or directory

There was no error the first time. Then I deleted the generated file and repeated the above command, but this error occurred. How can I fix it?

PHPzPHPz2713 days ago474

reply all(3)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-16 16:51:31

    Actually, after you delete it, it doesn’t think you deleted it and it’s vendor/composer/autoload_classmap.php会缓存这,所以会报错,因为找不到了,这个时候重新生成autoload_classmap.php,执行这个就composer dump-autoloadok

    reply
    0
  • PHP中文网

    PHP中文网2017-05-16 16:51:31

    First open the command prompt in the project directory and run composer install

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-16 16:51:31

    Is this file 2016_11_27_181313_create_articles_table.php missing?

    reply
    0
  • Cancelreply