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.
symfony/ai-symfony-mate-extension
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata