我想使用jeremykenedy / laravel-roles。当我输入:
$ php artisan migrate:status
有节目:没有找到迁移。我在数据库/迁移中进行了迁移。
怎么解决?提前致谢!
首先安装迁移,然后使用此命令
php artisan migrate:install
然后使用此命令
php artisan migrate:status
最近在添加config / database.php文件后出现此问题。
此文件返回具有数据库连接设置的数组,但也有一个用于定义迁移表的键。如果您没有这个定义,Laravel将不知道在哪里寻找迁移。
<?php
return [
connections: [
// ...
],
'migrations' => 'migrations' /* <-- make sure you have this line */
];
如果您没有该文件,则默认情况下会在迁移表中查找。
配置文件的示例可以在这里找到https://github.com/laravel/laravel/blob/master/config/database.php
您需要首先将资产发布到您的项目:
php artisan vendor:publish --tag=laravelroles
在我的情况下,下面的步骤做了伎俩。
composer install
php artisan migrate