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

Creating Boxes

Compared to Modules there's not much sense to create an in-app box, even if it's technically possible. The reason is that a Box can be considered an application boilerplate, so why define a template and immediately overwrite it? Your application is responsible for everything an in-app Box would do.

Creating An External Box (With Git And Composer)

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

  2. Add composer.json:

    {
        "name": "vendor/mybox",
        "description": "My Box Rulez",
        "type": "library",
        "require": {
            "php": ">=7.0.0",
            "konekt/concord": ">=0.9.10"
        },
        "autoload": {
            "psr-4": { "Vendor\\MyBox\\": "src/" }
        }
    }
    
  3. Create the file src/Providers/ModuleServiceProvider.php:

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

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

Adding Modules To The Box

Boxes have their primary config file located in resources/config/box.php. Modules need to be added here:

<?php

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

The empty arrays in the example mean that everything from those modules will be imported according to the defaults.

Overriding Module Parts

Suppressing Migrations

You may decide to gather/modify/skip migrations from the underlying modules. In this case you can suppress migrations provided by the module:

<?php

return [
    'modules' => [
        Vendor\MyModule\Providers\ModuleServiceProvider::class => [
            'migrations' => false    
        ],
        Vendor\AnotherModule\Providers\ModuleServiceProvider::class => [
            'migrations' => false            
        ]
    ]
];

See also: Box Configuration and Turn Migrations On/Off

!> Make sure to provide a compatible replacement if you're suppressing a module's migration.

Adding A Box To An Application

  1. In the laravel application: composer require vendor/mybox

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

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

Next: Configuration »

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