简体   繁体   中英

Getting an error when running php artisan generate command in laravel

when I try to run:

php artisan generate:migration create_users_table

I get this error:

[ErrorException]
file_put_contents(C:\xampp\htdocs\nldb.dev/database/migrations/2014_09_10
_013940_create_users_table.php): failed to open stream: No such file or di
rectory

I have ran composer install/update, I created the project using composer, etc.

I am on Win 7 using xampp and virtual hosts. Thanks for any suggestions you can give me.

Please note for some reason it uses "nldb.dev/database" instead of nldb.dev/app/database. Anyone know how to fix this?

If you are using the Jeffery Way's generator and laravel's version 4.2. The problem may be with the configurations of the files and targeted directories to make files the packages points to.

If so go to the vendor/way/generators/src/config/config.php location and make the following changes.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM