Back

php artisan generate:migrate ErrorException


Hello, 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.

Edit: Please note for some reason it uses "nldb.dev/database" instead of nldb.dev/app/database and im not sure why.

Sikandhar replied 3 years ago

This may help,

dump-autoload composer once try,

composer dump-autoload
Pkallesoe replied 3 years ago

Hi,

Check this out: https://github.com/JeffreyWay/Laravel-4-Generators/issues/365

I had the same issue and this fixed it. But it depends on your laravel version and generator version.

zinmyintnaung replied 6 months ago

For my case, I manually deleted User.php and also remove two migration files under \database\migrations\ path. Then when I run make:model User -m, I got the error of creating migration. Then I removed the created User.php under app folder. Then run composer dump-autoload. After that run make:model command again and it works.


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us