File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -115,12 +115,12 @@ protected function setupRouters(): void
115
115
foreach ($ routerFiles as $ file ) {
116
116
if (!in_array ($ file , $ this ->exclRouterFiles )) {
117
117
$ dir = $ this ->dir ->getRoot ();
118
- if (strpos ($ file , "/ " ) === 0 ) {
119
- $ path = "{ $ dir }" . ltrim ($ file , " / " );
118
+ if (strpos ($ file , ". / " ) === 0 ) {
119
+ $ path = realpath ( dirname ( __FILE__ ). substr ($ file , 1 ). " .php " );
120
120
} else {
121
- $ path = "{$ dir }app/Http/Routes/ {$ file }" ;
121
+ $ path = "{$ dir }app/Http/Routes/ {$ file }.php " ;
122
122
}
123
- $ this ->includeRoutes ($ this ->dispatcher , "{ $ path} .php " );
123
+ $ this ->includeRoutes ($ this ->dispatcher , $ path );
124
124
}
125
125
}
126
126
}
@@ -129,7 +129,7 @@ protected function setupRouters(): void
129
129
130
130
protected function defualtRoutes (array $ routerFiles ) {
131
131
if ($ this ->dispatcher ->getMethod () === "CLI " ) {
132
- $ routerFiles [] = "/app/Libraries/Foundation /Cli/Routers/default " ;
132
+ $ routerFiles [] = "./.. /Cli/Routers/default " ;
133
133
}
134
134
return $ routerFiles ;
135
135
}
You can’t perform that action at this time.
0 commit comments