File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1007,6 +1007,10 @@ public function setAction(array $action)
1007
1007
$ this ->domain ($ this ->action ['domain ' ]);
1008
1008
}
1009
1009
1010
+ if (isset ($ this ->action ['can ' ])) {
1011
+ $ this ->can ($ this ->action ['can ' ]);
1012
+ }
1013
+
1010
1014
return $ this ;
1011
1015
}
1012
1016
Original file line number Diff line number Diff line change @@ -900,6 +900,15 @@ public function testCanSetMiddlewareOnRegisteredResource()
900
900
$ this ->seeMiddleware (RouteRegistrarMiddlewareStub::class);
901
901
}
902
902
903
+ public function testCanSetMiddlewareCanOnGroups ()
904
+ {
905
+ $ this ->router ->can ('test ' )->group (function ($ router ) {
906
+ $ router ->get ('/ ' );
907
+ });
908
+
909
+ $ this ->seeMiddleware ('can:test ' );
910
+ }
911
+
903
912
public function testCanSetMiddlewareForSpecifiedMethodsOnRegisteredResource ()
904
913
{
905
914
$ this ->router ->resource ('users ' , RouteRegistrarControllerStub::class)
You can’t perform that action at this time.
0 commit comments