Laravel migrate failed to open stream: No such file or directory

08 Apr 2019 . Tips and Tricks . 1.6K views

Hello

If you are having issue of Laravel migrate failed to open stream: No such file or directory, then this post might be helpful for you. Currently, I have the same issue. Let me tell you how did I fix this issue.

Firstly I have run dump-update.

Compose dumpautoload

or

composer dump-autoload

Now you should able to run the migration command-

php artisan make:migration create_users_table

If you are still having the same issue, maybe you can try with

php artisan cache:clear

Because sometimes it happened because of cache issue.

Thank you.