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.
Start by installing the package via Composer and registering it in config/concord.php. The core workflow involves:
php artisan make:module Ordersapp/Modules/Orders/ModuleServiceProvider to config/concord.phpvendor/), ensure they follow Concord conventions (e.g., ModuleServiceProvider, config/, database/migrations/)
First use case: scaffold a small business module (e.g., Products) for reuse across multiple internal apps—concentrate on decoupling the logic, avoiding direct dependencies on app-specific code.app/Modules/{Name}/ or src/ for external modules.BaseBoxServiceProvider: Extend it instead of ServiceProvider to gain Concord’s conventions (e.g., auto-discovery of config, views, lang, migrations).config/mybox.php, publish views, or extend models (e.g., App\Models\Product extends \Vendor\MyBox\Models\Product).Routes/web.php and Routes/api.php inside the module; Concord auto-loads them.EventServiceProvider, then override them in the host app using event bindings configuration.classpath_to_slug() and morph_type_of() for consistent naming in logs, policy keys, and polymorphic relations.config/concord.php—watch for typos in provider class names.vendor/vendor/module/config/mybox.php) must be published/config-merged manually; use config('mybox') only after publishing or with explicit merging.module::orders.index).2024_05_01_000000_create_orders_table.php) and avoid hard-coded IDs in foreign keys.concord.php and use auto-discovery—plan modular code to be forward-compatible (e.g., avoid concord:* commands in scripts).ModuleFactory or use App::bind() in tests to override module bindings without modifying config/concord.php.How can I help you explore Laravel packages today?