Laravel php artisan make:auth 没有创建迁移表

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/43182469/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 15:42:43  来源:igfitidea点击:

Laravel php artisan make:auth no migration table is created

phplaravellaravel-5

提问by Sisir

I am following Laravel documentation for creating Authenticationsystem.

我正在关注 Laravel 文档以创建身份验证系统。

My Steps Are

我的步骤是

  1. Installing fresh laravel using laravel new my-project
  2. Then enter into directory (cd my-project). Edit the database config file with database credentials.
  3. Then run php artisan make:auth. All migration php files are created.
  4. Run php artisan migrate. CLI responds with nothing to migrate
  1. 使用安装新的 Laravel laravel new my-project
  2. 然后进入目录(cd my-project)。使用数据库凭据编辑数据库配置文件。
  3. 然后运行php artisan make:auth。创建所有迁移 php 文件。
  4. 运行php artisan migrate。CLI 响应nothing to migrate

So I went back to check the database using phpmyadmin. I do not see any migration table.

所以我回去使用phpmyadmin检查数据库。我没有看到任何迁移表。

System & Version info

系统和版本信息

  1. Vagrant box laravel/homestead
  2. Database mariaDb
  3. Laravel installer v1.3.5, by cli command laravel -v
  4. Laravel v5.4.16, from composer.lock
  1. 流浪盒子 laravel/homestead
  2. 数据库 mariaDb
  3. Laravel 安装程序v1.3.5,通过 cli 命令laravel -v
  4. Laravelv5.4.16来自composer.lock

Can anyone point me to the right direction?

谁能指出我正确的方向?

回答by Brane

Also, you can try this:

另外,你可以试试这个:

php artisan migrate:installwhich creates the migrations table only

php artisan migrate:install仅创建迁移表

php artisan migrateruns your other migrations

php artisan migrate运行您的其他迁移

回答by Balraj Allam

Configure your database in .envfile

.env文件中配置您的数据库

DB_HOST=127.0.0.1
DB_DATABASE=DbName   //Your DB Name 
DB_USERNAME=root
DB_PASSWORD=password123