Skip to content

Commit 14fadeb

Browse files
committed
allow closure
1 parent 2f9f35f commit 14fadeb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Illuminate/Routing/Attributes/Controllers/Middleware.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Illuminate\Routing\Attributes\Controllers;
44

55
use Attribute;
6+
use Closure;
67

78
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
89
class Middleware
@@ -12,7 +13,7 @@ class Middleware
1213
* @param array<string>|null $except
1314
*/
1415
public function __construct(
15-
public string $value,
16+
public Closure|string $value,
1617
public ?array $only = null,
1718
public ?array $except = null,
1819
) {

0 commit comments

Comments
 (0)