Skip to content

Commit 04ee223

Browse files
committed
Changelog:
- Update: ensure autoloaded modules has their routes loaded
1 parent 721054e commit 04ee223

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

app/Providers/RouteServiceProvider.php

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -93,27 +93,12 @@ protected function mapApiRoutes()
9393
*/
9494
protected function mapModulesRoutes()
9595
{
96-
// make module class
97-
$Modules = app()->make( ModulesService::class );
98-
99-
foreach ( $Modules->getEnabled() as $module ) {
100-
/**
101-
* We might check if the module is active
102-
*/
103-
104-
// include module controllers
105-
/**
106-
* @deprecated this inclusion seems useless now
107-
*/
108-
$controllers = Storage::disk( 'ns-modules' )->files( $module[ 'controllers-relativePath' ] );
109-
110-
foreach ( $controllers as $controller ) {
111-
$fileInfo = pathinfo( $controller );
112-
if ( $fileInfo[ 'extension' ] == 'php' ) {
113-
include_once base_path( 'modules' ) . DIRECTORY_SEPARATOR . $controller;
114-
}
115-
}
96+
/**
97+
* @var ModulesService $Modules
98+
*/
99+
$modulesService = app()->make( ModulesService::class );
116100

101+
foreach ( $modulesService->getEnabledAndAutoloadedModules() as $module ) {
117102
$domain = pathinfo( env( 'APP_URL' ) );
118103

119104
/**

config/nexopos.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* This is the core version of NexoPOS. This is used to displays on the
1010
* dashboard and to ensure a compatibility with the modules.
1111
*/
12-
'version' => '5.2.4-b1',
12+
'version' => '5.2.4-b2',
1313

1414
/**
1515
* --------------------------------------------------------------------

0 commit comments

Comments
 (0)