我有付费会员和一般用户。我需要检查用户登录的付费会员资格是否过期。目前,我正在检查登录名何时重定向到个人资料页面
if(auth()->user()->type == 'paid' || auth()->user()->type == 'subscriber') {
$user = PaymentController::checkPaid();
}
如何检查登录时已付款?
我尝试将Checkpaid添加到AuthenticatesUsers登录方法中,这是正确的方法
if ($this->attemptLogin($request)) {
if(auth()->user()->type == 'paid' || auth()->user()->type == 'subscriber') {
$user = PaymentController::checkPaid();
}
return $this->sendLoginResponse($request);
}