We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ThrottleRequests::using
1 parent 3d8ed4e commit 18cd6abCopy full SHA for 18cd6ab
src/Illuminate/Routing/Middleware/ThrottleRequests.php
@@ -13,6 +13,8 @@
13
use RuntimeException;
14
use Symfony\Component\HttpFoundation\Response;
15
16
+use function Illuminate\Support\enum_value;
17
+
18
class ThrottleRequests
19
{
20
use InteractsWithTime;
@@ -44,12 +46,12 @@ public function __construct(RateLimiter $limiter)
44
46
/**
45
47
* Specify the named rate limiter to use for the middleware.
48
*
- * @param string $name
49
+ * @param \UnitEnum|string $name
50
* @return string
51
*/
52
public static function using($name)
53
- return static::class.':'.$name;
54
+ return static::class.':'.enum_value($name);
55
}
56
57
0 commit comments