Download the PHP package smony/module without Composer
On this page you can find all versions of the php package smony/module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package module
Module Package for Laravel 11
This package provides a simple way to create and manage modules in Laravel 11. It offers a modular architecture that allows developers to separate functionality into independent modules, making the application more scalable and maintainable.
Features
- Create Modules: Easily generate new modules using a command.
- Manage Module Status: Enable or disable modules through the
enabled_modules.jsonfile. - Auto Register Routes: Automatically load web and API routes for each module.
- Versioning Support: Track module versions via the
module.jsonfile. - Migration Support: Automatically register and run migrations for modules.
- Customizable Module Directory: You can set a custom directory for storing modules via the
module.phpconfiguration file. - View All Modules: Use a command to list all modules with their status and version.
Installation
-
Add the package to your
composer.jsonfile: -
Publish the configuration file:
-
Create your first module using the built-in command:
This will create a new module with its own structure, including routes, controllers, migrations, and more.
Basic Usage
Creating a Module
To create a new module, use the following command:
This will create a folder inside the Modules directory (or a custom directory, if configured) with the following structure:
Viewing All Modules
You can list all modules, their status, and their version using:
This command will display a table with information about each module.
Enable or Disable a Module
Modules are managed through the enabled_modules.json file located in the root directory. To disable a module, simply set its status to false:
Customizing Module Directory
By default, modules are created inside the Modules directory. You can change this by updating the module.php configuration file.
Future Plans
- Add more customizable commands for module creation.
- Improve the versioning system and compatibility checking.
- Add tests for better package stability.
- Add more features like modular middleware and more advanced routing.
Contributing
Feel free to contribute to this project! Fork, create a feature branch, and submit a pull request.
License
This package is open-sourced software licensed under the MIT license.
All versions of module with dependencies
illuminate/support Version ^11.0
spatie/laravel-package-tools Version ^1.0