Download the PHP package teksite/module without Composer
On this page you can find all versions of the php package teksite/module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package module
Modular Laravel Package
A comprehensive Laravel package that brings modularity to your applications. It allows you to organize your code into reusable, self-contained modules — each with its own controllers, models, views, and service providers. The package provides Artisan commands similar to Laravel's native ones, prefixed with module: for easy module management.
Table of Contents
- About
- Author
- Contact
- Installation
- Usage
- Creating a Module
- Module Commands
- Changing Module Priority
- Integration with Lareon
- Credits
- License
- Support
About
The Modular Laravel Package (teksite/module) enables full modularity in Laravel applications. Modules are stored in the Lareon/Modules directory, each replicating a mini Laravel structure. The package mirrors native Laravel Artisan commands but prefixes them with module: to avoid conflicts.
Note: From version 3 onward, this package is merged with
teksite/lareon. Both functionalities are now provided in a single package.
Author
Sina Zangiband
Contact
- Website: teksite.net , laratek.ir , laratek.net
- Email: [email protected]
Contact
- Website: teksite.net , laratek.ir , laratek.net
- Email: [email protected]
Installation
Compatibility
| Laravel Version | Package Version |
|---|---|
| 11.x | ^1.0 |
| 12.x | ^2.0 |
| 13.x | ^3.0 |
Step 1: Install via Composer
Run the following command:
Note on wikimedia/composer-merge-plugin
If prompted with:
Press y and Enter. This plugin is required to merge composer.json files from modules.
Note on wikimedia/composer-merge-plugin
If prompted with: Do you trust "wikimedia/composer-merge-plugin" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?]
Press y and Enter. This plugin is required to merge composer.json files from modules.
Step 2: Register the Service Provider
Note: For Laravel 5.5 and above, auto-discovery handles this automatically. The following step is optional for newer versions.
Laravel 10 and above
Add the provider to bootstrap/providers.php:
Laravel 5.x and Earlier
Add the provider to config/app.php under providers:
Step 3: Publish Configuration (Optional)
Publish the configuration files for customization:
The package publishes two config files:
modules.php– general package behaviormodules-hq.php– control over modules managed by Steward (e.g., routing)
Both are accessible via config('modules').
Step 4: Update composer.json
To enable autoloading of modules and the Steward provider, add the following to your composer.json:
Step 5: Clear Cache
Run the following commands to clear cached data:
Step 6: Refresh Autoloader
Run Composer's autoload dump:
Step 7: Install Steward (Optional but Recommended)
To install Steward, run:
If Steward is not installed, each module must be managed independently.
Usage
Creating a Module
Generate a new module with a structure similar to Laravel:
Or create a module managed by Steward:
- By default, modules are created in
lareon/Modules/{Example}. - The
--stewardflag indicates that the module should be managed by Steward (registration of views, configs, routes, etc. are in control of Steward).
Module Commands
All module‑specific Artisan commands are prefixed with module:.
Examples
-
Create a controller:
-
Create a model:
-
Create a middleware:
- And other laravel command.
Note: Replace
ExampleModulewith your actual module name. To create files inside Steward (instead of a module), useStewardas the module name.
Changing Module Priority
To adjust the loading order of modules, edit the bootstrap/modules.php file. Reorder the array to prioritize specific modules:
Change Mode
To switch an existing module between steward‑controlled (steward) and self‑managed (self), update the type in bootstrap/modules.php:
and update the $type property in {ModuleName}ServiceProvider:
Integration with Lareon
This package is now merged with teksite/lareon. The main difference in naming is steward instead of previous terms like cms.
To switch an existing module between steward-controlled (steward) and self-managed (self), update the type in bootstrap/modules.php:
and update {ModuleName}ServiceProvider
Warning: Changing between these two modes generally does not cause issues, provided you do not override internal methods.
Credits
License
This package is open‑sourced under the MIT License.
Support
For questions, issues, or feature requests, please reach out via:
- Website: teksite.net
- Email: [email protected]
- GitHub Issues: teksite/module
Contributions are welcome! Feel free to submit a pull request or open an issue on GitHub.
All versions of module with dependencies
laravel/framework Version ^13.0
ext-dom Version *
ext-json Version *
ext-simplexml Version *
wikimedia/composer-merge-plugin Version ^2.1