php artisan无需迁移即可迁移错误
当我尝试使用php artisan无需迁移即可迁移错误,php,laravel,composer-php,artisan-migrate,Php,Laravel,Composer Php,Artisan Migrate,当我尝试使用php-artisan-migrate进行迁移时,它告诉我没有什么可迁移的,我尝试在安装完所有内容后在服务器上进行安装。此外,迁移表也不存在。以下是我所做的: php composer.phar需要igaster/laravel_cities 提供程序app.php中的更改 Igaster\LaravelCities\GeoServiceProvider::class, 运行此脚本 mkdir storage/geo cd storage/geo wget http://downlo
php-artisan-migrate
进行迁移时,它告诉我没有什么可迁移的,我尝试在安装完所有内容后在服务器上进行安装。此外,迁移表也不存在。以下是我所做的:
Igaster\LaravelCities\GeoServiceProvider::class,
mkdir storage/geo
cd storage/geo
wget http://download.geonames.org/export/dump/allCountries.zip && unzip allCountries.zip && rm allCountries.zip
wget http://download.geonames.org/export/dump/hierarchy.zip && unzip hierarchy.zip && rm hierarchy.zip
现在,当我运行php-artisan-migrate
时,它告诉我没有要迁移的内容
我不确定这是否是因为我使用了
php composer.phar
而不是composer
php composer.phar与composer相同,因此这不是问题所在
如果迁移文件未显示,则可能需要运行
php artisan vendor:publish
尝试运行:
php artisan vendor:publish --provider="Igaster\LaravelCities\GeoServiceProvider"
然后运行迁移
php artisan migrate
将
vendor/igaster/laravel_cities/src/migrations
文件夹内容复制到database\migrations
文件夹中,然后运行php artisan migrate
。有时,发布供应商资源对我来说也不起作用,我会深入到软件包的源代码中,然后让它们发挥作用。尝试php artisan config:cache
然后重新键入php artisan migrate
-希望这对我有帮助……@Hina,您应该运行composer dump autoload
,然后尝试php artisan migrate:refresh
。这将删除所有当前迁移并重新迁移them@Optionmigrate:refresh命令创建除此之外的所有表,它也不包括在迁移中table@Hina,我刚刚编辑了我的评论。试一试^@Hinaphp artisan供应商:publish--provider=“Igaster\LaravelCities\GeoServiceProvider”
仍无需迁移运行此命令后仍无需迁移我在运行命令[Symfony\Component\Console\Exception\RuntimeException]时出现此错误参数太多,预期参数“command”.我想在提供者前面加上“-”。感谢@rbaskam的编辑建议。立即尝试如果仍然失败,您可以“手动”发布文件,只需将供应商/igaster/laravel_cities/src/migrations
中的文件复制到您的migrations文件夹中即可