We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 035ce86 commit 1dcbf57Copy full SHA for 1dcbf57
src/Module.php
@@ -258,12 +258,13 @@ private function registerRoutes(): void
258
259
if (file_exists($routePath) && empty(($files = glob($routeFilePattern))) === false) {
260
foreach ($files as $file) {
261
+ $fileName = basename($file);
262
// Skip files that are not allowed route types
- if (in_array(rtrim($file, '.php'), static::ROUTE_FILE_TYPES) === false) {
263
+ if (in_array(rtrim($fileName, '.php'), static::ROUTE_FILE_TYPES) === false) {
264
continue;
265
}
266
- $path = sprintf('%s/%s', $routePath, basename($file));
267
+ $path = sprintf('%s/%s', $routePath, $fileName);
268
269
$this->loadRoutesFrom($path);
270
0 commit comments