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()
8383 foreach ($ collection ->all () as $ name => $ route ) {
8484
8585 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+ }
8792 continue ;
8893 }
8994
@@ -196,8 +201,12 @@ public function getResources()
196201 */
197202 public function isRouteExposed (Route $ route , $ name )
198203 {
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 ' );
201210 }
202211
203212 protected function getDomainByRouteMatches ($ matches , $ name )
You can’t perform that action at this time.
0 commit comments