[英]Laravel 5.1 Auth::attempt() not working if User has softdelete attribute
[英]Lumen 5.1 Auth::attempt Not working
我正在使用lumen 5.1.*
但是每当我使用Auth都会抛出错误
AuthManager.php第16行中的ErrorException:缺少Illuminate \\ Auth \\ AuthManager :: createDriver()的参数1,在第87行的D:\\ xampp \\ htdocs \\ project \\ vendor \\ illuminate \\ support \\ Manager.php中调用并定义
谁能帮我解决这个问题。我需要在流明中使用Auth::user()
public function postLogin(Request $request){
if (Auth::attempt(['email' => $request->email, 'password' => $request->password])) {
// Authentication passed...
echo "success";
echo "<pre>";
print_r(Auth::user()->toArray());
} else {
echo "sorry erorr occured";
}
}
设置您的.env
文件,然后检查
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.