diff --git a/src/Illuminate/Routing/Middleware/ThrottleRequests.php b/src/Illuminate/Routing/Middleware/ThrottleRequests.php index 1050b6669c4a..2a03d967a210 100644 --- a/src/Illuminate/Routing/Middleware/ThrottleRequests.php +++ b/src/Illuminate/Routing/Middleware/ThrottleRequests.php @@ -75,6 +75,10 @@ protected function resolveMaxAttempts($request, $maxAttempts) $maxAttempts = explode('|', $maxAttempts, 2)[$request->user() ? 1 : 0]; } + if (! is_numeric($maxAttempts) && $request->user()) { + $maxAttempts = $request->user()->{$maxAttempts}; + } + return (int) $maxAttempts; }