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
Laravel php artisan make:auth no migration table is created
提问by Sisir
I am following Laravel documentation for creating Authenticationsystem.
我正在关注 Laravel 文档以创建身份验证系统。
My Steps Are
我的步骤是
- Installing fresh laravel using
laravel new my-project
- Then enter into directory (
cd my-project
). Edit the database config file with database credentials. - Then run
php artisan make:auth
. All migration php files are created. - Run
php artisan migrate
. CLI responds withnothing to migrate
- 使用安装新的 Laravel
laravel new my-project
- 然后进入目录(
cd my-project
)。使用数据库凭据编辑数据库配置文件。 - 然后运行
php artisan make:auth
。创建所有迁移 php 文件。 - 运行
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
系统和版本信息
- Vagrant box
laravel/homestead
- Database mariaDb
- Laravel installer
v1.3.5
, by cli commandlaravel -v
- Laravel
v5.4.16
, fromcomposer.lock
- 流浪盒子
laravel/homestead
- 数据库 mariaDb
- Laravel 安装程序
v1.3.5
,通过 cli 命令laravel -v
- Laravel
v5.4.16
来自composer.lock
Can anyone point me to the right direction?
谁能指出我正确的方向?
回答by Brane
Also, you can try this:
另外,你可以试试这个:
php artisan migrate:install
which creates the migrations table only
php artisan migrate:install
仅创建迁移表
php artisan migrate
runs your other migrations
php artisan migrate
运行您的其他迁移
回答by Balraj Allam
Configure your database in .env
file
在.env
文件中配置您的数据库
DB_HOST=127.0.0.1
DB_DATABASE=DbName //Your DB Name
DB_USERNAME=root
DB_PASSWORD=password123