Skip to content

Commit

Permalink
Changelog:
Browse files Browse the repository at this point in the history
- Update: ensure autoloaded modules has their routes loaded
  • Loading branch information
Blair2004 committed Apr 22, 2024
1 parent 721054e commit 04ee223
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
25 changes: 5 additions & 20 deletions app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,27 +93,12 @@ protected function mapApiRoutes()
*/
protected function mapModulesRoutes()
{
// make module class
$Modules = app()->make( ModulesService::class );

foreach ( $Modules->getEnabled() as $module ) {
/**
* We might check if the module is active
*/

// include module controllers
/**
* @deprecated this inclusion seems useless now
*/
$controllers = Storage::disk( 'ns-modules' )->files( $module[ 'controllers-relativePath' ] );

foreach ( $controllers as $controller ) {
$fileInfo = pathinfo( $controller );
if ( $fileInfo[ 'extension' ] == 'php' ) {
include_once base_path( 'modules' ) . DIRECTORY_SEPARATOR . $controller;
}
}
/**
* @var ModulesService $Modules
*/
$modulesService = app()->make( ModulesService::class );

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

/**
Expand Down
2 changes: 1 addition & 1 deletion config/nexopos.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* This is the core version of NexoPOS. This is used to displays on the
* dashboard and to ensure a compatibility with the modules.
*/
'version' => '5.2.4-b1',
'version' => '5.2.4-b2',

/**
* --------------------------------------------------------------------
Expand Down

0 comments on commit 04ee223

Please sign in to comment.