Package Data | |
---|---|
Maintainer Username: | iurylippo |
Maintainer Contact: | n.widart@gmail.com (Nicolas Widart) |
Package Create Date: | 2020-06-09 |
Package Last Update: | 2020-07-31 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-01-30 03:04:25 |
Package Statistics | |
---|---|
Total Downloads: | 128 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 1 |
| Laravel-Lumen | lumen-modules | |---|---|
| 7.0 | ^7.0 |
iurylippo/lumen-modules
lumen package to generate modules with controllers, providers, services, repositories,
entities and tests in a Dependency Injected way.
To install through Composer, by run the following command:
composer require iurylippo/lumen-modules
By default the module classes are not loaded automatically. You can autoload your modules using psr-4
. For example:
{
"autoload": {
"psr-4": {
"App\\": "app/",
"Modules\\": "Modules/"
}
}
}
Tip: don't forget to run composer dump-autoload
afterwards.
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 inbootstrap/app.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/';
});
Tip: Put this path bind above the $app.
You'll find installation instructions and full documentation on https://nwidart.com/laravel-modules/. THE ORIGINAL PACKAGE FOR LARAVEL
Nicolas Widart is a freelance web developer specialising on the Laravel framework. View all the packages on my website, or visit my website.
The MIT License (MIT). Please see License File for more information.