简体   繁体   English

php artisan make:auth脚手架不起作用

[英]php artisan make:auth scaffolding not working

I'm trying to activate the authentication in Laravel 5.7. 我正在尝试激活Laravel 5.7中的身份验证。 Reading the documentation I have started a new fresh project with the command: 阅读文档后,我使用以下命令启动了一个新的新项目:

composer create-project --prefer-dist laravel/laravel bpcb

and then I have edited my .env file with my credentials: 然后用我的凭据编辑了.env文件:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=valcanale
DB_USERNAME=stefano
DB_PASSWORD=password

after that I wrote the command php artisan migrate but I've got the message 之后,我写了命令php artisan migrate但我收到了消息

Nothing to migrate

Under app\\Http\\Controllers\\Auth I have these files: app\\Http\\Controllers\\Auth我有以下文件:

ForgotPasswordController.php
LoginController.php
RegisterController.php
ResetPasswordController.php
VerificationPasswordController.php

This is a fresh project and I haven't touched anything. 这是一个新项目,我什么也没动。 Can you help me? 你能帮助我吗?

Thank you. 谢谢。

Please make sure that your .env settings are correct. 请确保您的.env设置正确。 Then restart the server ( stop and then type php artisan serve again ) Then run command php artisan make:auth after this run php artisan migrate ( run migrate command after making auth ) 然后重新启动服务器(停止,然后键入PHP工匠再次担任)然后运行命令php artisan make:auth这个运行后php artisan migrate (运行使验证后的迁移命令)

What happens when you try this( Also make sure your .env database settings are correct ) 尝试此操作会发生什么(还要确保.env数据库设置正确)

 php artisan config:cache
 php artisan migrate:reset
 php artisan migrate

After this check your database 此后检查您的数据库

Got it from this link . 从此链接得到它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM