File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,12 @@ public function getRoutes()
83
83
foreach ($ collection ->all () as $ name => $ route ) {
84
84
85
85
if ($ route ->hasOption ('expose ' )) {
86
- $ routes ->add ($ name , $ route );
86
+
87
+ $ expose = $ route ->getOption ('expose ' );
88
+
89
+ if ($ expose !== false && $ expose !== 'false ' ) {
90
+ $ routes ->add ($ name , $ route );
91
+ }
87
92
continue ;
88
93
}
89
94
@@ -196,8 +201,12 @@ public function getResources()
196
201
*/
197
202
public function isRouteExposed (Route $ route , $ name )
198
203
{
199
- return true === $ route ->hasOption ('expose ' ) ||
200
- ('' !== $ this ->pattern && preg_match ('#^ ' . $ this ->pattern . '$# ' , $ name ));
204
+ if (false === $ route ->hasOption ('expose ' )) {
205
+ return ('' !== $ this ->pattern && preg_match ('#^ ' . $ this ->pattern . '$# ' , $ name ));
206
+ }
207
+
208
+ $ status = $ route ->getOption ('expose ' );
209
+ return ($ status !== false && $ status !== 'false ' );
201
210
}
202
211
203
212
protected function getDomainByRouteMatches ($ matches , $ name )
You can’t perform that action at this time.
0 commit comments