Running php artisan migrate --path=/app/database/migrations/foo/ does not run the migrations under that directory. Output in the terminal is "Nothing to migrate".
The same issue seems to exist if the --path=/app/database/migrations/ as well (which is the default directory to run)
In my case, php artisan migrate --path=database/migrations/foo is enough. The app directory is not necessary.
thanks @zzpwestlife . That worked for me.
thanks @zzpwestlife. It 's worked like a charm
Open IlluminateDatabaseMigrationsMigrator.php file. At line 430 (Migrator::getMigrationFiles()). Replace return $this->files->glob($path.'/_.php'); with return Str::endsWith($path,'.php') ? [$path] : $this->files->glob($path.'/_.php');
Now the --path option will work normally
Most helpful comment
In my case,
php artisan migrate --path=database/migrations/foois enough. Theappdirectory is not necessary.