Lumen

Lumen doesn't come with a vendor publisher. In order to use laravel-modules with lumen you have to set it up manually.

Create a config folder inside the root directory and copy vendor/nwidart/laravel-modules/config/config.php to that folder named modules.php

mkdir config
cp vendor/nwidart/laravel-modules/config/config.php config/modules.php

Then load the config and the service provider in app/bootstrap.php

$app->configure('modules');
$app->register(\Nwidart\Modules\LumenModulesServiceProvider::class)

Laravel-modules uses path.public which isn't defined by default in Lumen. Register path.public before loading the service provider.

$app->bind('path.public', function() {
 return __DIR__ . 'public/';
});