Looking to hire Laravel developers? Try LaraJobs
This package is not available.

modular-laravel maintained by froeschke

Last update
2026/05/26 20:37 (dev-main)
License
Links
Downloads
4

Comments
comments powered by Disqus

Modular Laravel

License Latest Version on Packagist Total Downloads

This packages simplifies making your Laravel application modular. It is intentionally kept simple, if you need more features check out nwidart/laravel-modules

The structure is inspired by this Laracon Talk from Ryuta Hamasaki (Repository)

Setup

composer require --dev froeschke/modular-laravel
php artisan modules:install

Optional: Publish the config file

php artisan vendor:publish --provider="Froeschke\ModularLaravel\ModularLaravelServiceProvider"

Create a module

php artisan modules:create ModuleName

Fix modules structure

Since empty folders are not in saved in git, you can run the following command, to ensure every folder exists:

php artisan modules:fix

Testing

To enable tests, you need to modify your phpunit.xml configuration. Add the following two test suites (if you've changed the default paths, you may need to change the test path)

<testsuites>
    <testsuite name="Unit">
        <directory suffix="Test.php">./modules/**/Tests/Unit</directory>
    </testsuite>
    <testsuite name="Feature">
        <directory suffix="Test.php">./modules/**/Tests/Feature</directory>
    </testsuite>
</testsuites>