Basically, because Composer can't see the migration files you are  creating, you are having to run the dump-autoload command which won't  download anything new, but looks for all of the classes it needs to  include again. It just regenerates the list of all classes that need to  be included in the project (autoload_classmap.php), and this is why your  migration is working after you run that command.
How to fix it (possibly) You need to add some extra information to your composer.json file.
  
  
Ideally, you execute
How to fix it (possibly) You need to add some extra information to your composer.json file.
"autoload": {
    "classmap": [
        "PATH TO YOUR MIGRATIONS FOLDER"
    ],
}php artisan clear-compiled 
composer dump-autoload
php artisan optimizeIdeally, you execute
composer dump-autoload -o , for a  faster load of your webpages. The only reason it is not default, is  because it takes a bit longer to generate (but is only slightly  noticable). 
0 Comments