请问我怎么将原来的Auth功能 从验证 邮箱和密码 改成验证 用户名和密码?

/app/Http/Controllers/Auth/AuthController.php代码如下:
<?php namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\Registrar;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;

class AuthController extends Controller {


use AuthenticatesAndRegistersUsers;

public function __construct(Guard $auth, Registrar $registrar)
{
    $this->auth = $auth;
    $this->registrar = $registrar;

    $this->middleware('guest', ['except' => 'getLogout']);
}

}
已邀请:

Mr_Jing

赞同来自: zhuzhichao

if (Auth::attempt(['username' => $username, 'password' => $password]))
    {
        return redirect()->intended('dashboard');
    }

http://laravel-china.org/docs/ ... users

要回复问题请先登录注册