首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >laravel 5.5内置身份验证要素数据库查询位置

问laravel 5.5内置身份验证要素数据库查询位置
EN

Stack Overflow用户
提问于 2018-02-09 13:47:37
回答 1查看 116关注 0票数 1

我在windows操作系统中使用laravel,使用MySql作为数据库,并尝试将我的web应用程序的登录连接到laravel的默认登录/注册。登录时在laravel中运行的默认查询是select * from users where email="something",我想知道这个查询的位置,以便根据我喜欢的表格式修改它。任何帮助都将不胜感激。谢谢

EN

回答 1

Stack Overflow用户

发布于 2018-02-09 13:56:14

它通过attemptLogin方法位于AuthenticatesUsers特征中:

代码语言:javascript
复制
/**
 * Attempt to log the user into the application.
 *
 * @param  \Illuminate\Http\Request  $request
 * @return bool
 */
protected function attemptLogin(Request $request)
{
    return $this->guard()->attempt(
        $this->credentials($request), $request->filled('remember')
    );
}

实际的实现是通过attempt方法使用卫士完成的:

代码语言:javascript
复制
public function attempt(array $credentials = [], $remember = false)

有关示例,请参阅Illuminate\Auth\SessionGuard:

https://github.com/laravel/framework/blob/5.5/src/Illuminate/Auth/SessionGuard.php#L347

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48699472

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档