Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Concord Laravel Package

konekt/concord

Laravel extension for building modular applications using conventions on top of service providers. Manage in-app and external modules with isolation-friendly structure, version compatibility across Laravel releases, and tooling around module registration and organization.

View on GitHub
Deep Wiki
Context7

Create A Module

Creating An In-app Module

  1. Create the module folder app/Modules/Demo

  2. Create the file app/Modules/Demo/Providers/ModuleServiceProvider.php:

    namespace App\Modules\Demo\Providers;
    
    use Konekt\Concord\AbstractModuleServiceProvider;
    
    class ModuleServiceProvider extends AbstractModuleServiceProvider
    {
    }
    
  3. Create app/Modules/Demo/resources/manifest.php:

    <?php
    
    return [
        'name'    => 'Demo App Module',
        'version' => '1.3.9'
    ];
    
  4. Add the module to config/concord.php:

    <?php
    
    return [
        'modules' => [
            App\Modules\Demo\Providers\ModuleServiceProvider::class,
        ]
    ];
    

Now if you run the php artisan concord:modules command it shows the newly added module:

+----+------------------+--------+---------+------+-------------------+
| #  | Name             | Kind   | Version | Id   | Namespace         |
+----+------------------+--------+---------+------+-------------------+
| 1. | Demo App Module  | Module | 1.3.9   | demo | App\Modules\Demo  |
+----+------------------+--------+---------+------+-------------------+

Creating An External Module (With Git And Composer)

  1. Init a git repo in an empty folder: git init .

  2. Add composer.json:

    {
        "name": "vendor/mymodule",
        "description": "My Module Rulez",
        "type": "library",
        "require": {
            "php": "^7.2",
            "konekt/concord": "^1.5"
        },
        "autoload": {
            "psr-4": { "Vendor\\MyModule\\": "src/" }
        }
    }
    
  3. Create the file src/Providers/ModuleServiceProvider.php:

    namespace Vendor\MyModule\Providers;
    
    use Konekt\Concord\BaseModuleServiceProvider;
    
    class ModuleServiceProvider extends BaseModuleServiceProvider
    {
    }
    
  4. Create src/resources/manifest.php:

    <?php
    
    return [
       'name'    => 'My Module',
       'version' => '1.0.0'
    ];
    
  5. Commit all the stuff, and publish it (github and packagist if it's open source)

  6. In the host application: composer require vendor/mymodule

  7. Add the module to config/concord.php:

    <?php
    
    return [
       'modules' => [
           Vendor\MyModule\Providers\ModuleServiceProvider::class,
       ]
    ];
    

You're done.

Next: Boxes Explained »

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4