一个莫名其妙搞不懂的登录问题

class TestController extends Controller {

public function getTest(){
$user = User::firstOrNew(['username' => 'ttt']);
$user->password = bcrypt("ttt");
$user->save();

return (Auth::check(['username' => 'ttt', 'password' => 'ttt']) ? 'True' : 'False');
}
}

页面的返回值是 ‘False’,妈蛋,到底哪里错了。。
已邀请:

东东

赞同来自:

laravel5自带的登陆用的是email作为账号来做验证的你换成这样['email'=>'xxxxxx','password'=>'xxxxx']试一试

要回复问题请先登录注册