password_last_updated)->diffInDays(now()); $updateThreshold = Options::getOption('password_expiry'); if ($updateThreshold !== 0 && $sinceUpdate > $updateThreshold) { session()->put('passwordExpired', true); } else { session()->put('passwordExpired', false); } } return $next($request); } }