1. 生成登陆代码
`php artisan make:auth`
2. 配置.env里面 DB_DATABASE, DB_USERNAME, DB_PASSWORD 3个字段
```
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=sttv-admin
DB_USERNAME=root
DB_PASSWORD=123456
```
3. 生成mysql表
`php artisan migrate`
> laravel 5.4 使用了 utf8mb4,如果你使用了mysql v5.7.7以下,请在
> AppServiceProvider加上以下代码 Schema::defaultStringLength(191)
> 官方链接说明了如何修复
> https://laravel.com/docs/master/migrations#creating-indexes
```
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
```
4. 注册与登陆
` https://youdomain.com/register `
` https://youdomain.com/login `