codder/laravel-modular

A simple package of modules for laravel.

v1.0.5 2024-02-04 21:02 UTC

This package is auto-updated.

Last update: 2024-05-04 21:26:34 UTC


README

Total Downloads Latest Stable Version License

codder/laravel-modular is a module system for Laravel applications. It uses Composer path repositories for autoloading, and Laravel package discovery for module initialization, and then provides minimal tooling to fill in any gaps. These modules use the existing Laravel package system, and follow existing Laravel conventions.

Documentation

The documentation will be available in soon.

Installation

You can install the package via composer:

composer require codder/laravel-modular

Create a module

Next, let's create a module:

php artisan module:make foo 

Modular will scaffold up a new module for you:

modules/
  composer.json
  foo/
    app/
    config/
    database/
    public/
    resources/
    routes/

Assets

Your assets are stored in modules/MODULE/public after that run php artisan storage:link to create symbolic links from your assets to public folder.

To call the assets in your blade just call the helper module_asset('foo::bar.jpg')

Livewire

This package supports Livewire >= 2!

License

This package is an open-sourced software licensed under the MIT license.