Download the PHP package selimppc/laravel-modules without Composer

On this page you can find all versions of the php package selimppc/laravel-modules. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-modules

Laravel Modules (lightweight)

selimppc/laravel-modules — convention-based modular structure for Laravel 11/12:

Requirements

PHP 8.3+
Laravel 11 / 12

Install

This will:

Enable modules

Edit in config/laravel-modules.php:

Autoload mapping (host app)

Add PSR-4 for your app (not the package) so Composer can load Modules\… classes:

Rebuild autoload files:

Try it

Start the dev server and visit the example routes:

Web → http://localhost:8000/example

API → http://localhost:8000/api/example

Make a new module

Enable it in config/laravel-modules.php:

Your module structure (convention):

| Migrations remain in the host app’s /database/migrations.

Production (performance)

Cache everything:

Why this is fast:

Troubleshooting

Target class does not exist (e.g., Modules\Example\Http\Controllers\…)
  1. Ensure PSR-4 mapping exists in your app’s composer.json (not dev): "autoload": { "psr-4": { "Modules\\": "Modules/" } }

Then:

  1. Check namespace & casing match the path exactly (case-sensitive FS):

    • Modules/Example/Http/Controllers/ExampleController.php
    • namespace Modules\Example\Http\Controllers;
  2. Clear route/config caches:

Verify:

Customization

FAQ

Q: Can I keep using my global routes and just use modules for controllers/views?

A: Yes. Set 'autoload_routes' => false and require your module route files manually or define routes in the app.

Q: Where do I put models?

A: Inside each module (e.g., Modules/Blog/Models/Post.php) or in your app—your choice. The package is unopinionated here.

Q: Can I use repositories/services?

A: Yes. Add contracts/implementations under Repositories/... and wire them in bindings.php.

Contributing

PRs welcome! Please include tests and update the README when changing behavior. License

MIT © selimppc


All versions of laravel-modules with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^11.0 || ^12.0
illuminate/routing Version ^11.0 || ^12.0
illuminate/console Version ^11.0 || ^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package selimppc/laravel-modules contains the following files

Loading the files please wait ...