Skip to content

Commit

Permalink
Module Discovery: Use DIRECTORY_SEPARATOR const instead of hardcoding
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsam726 committed Apr 19, 2024
1 parent 3eadfe8 commit 3dad95c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ModulesPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function getModulePlugins(): array
}
// get a glob of all Filament plugins
$basePath = str(config('modules.paths.modules', 'Modules'));
$pattern = $basePath . '/*/app/Filament/*Plugin.php';
$pattern = $basePath . DIRECTORY_SEPARATOR . '*' . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'Filament' . DIRECTORY_SEPARATOR . '*Plugin.php';
$pluginPaths = glob($pattern);

return collect($pluginPaths)->map(fn ($path) => FilamentModules::convertPathToNamespace($path))->toArray();
Expand Down

0 comments on commit 3dad95c

Please sign in to comment.