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

Misc Functions

Concord contains several helper functions that can be used by applications as well.

classpath_to_slug()

This function converts a fully qualified classname to a string, backslashes to dots, parts to snake case:

classpath_to_slug(App\Providers\AppServiceProvider::class);
// => 'app.providers.app_service_provider'

slug_to_classpath()

Counterpart of classpath_to_slug, that converts the string back to a fully qualified classname.

slug_to_classpath('app.providers.app_service_provider');
// => 'App\Providers\AppServiceProvider' 

morph_type_of()

This function is essentially the inverse of Relation::getMorphedModel($alias).

It retrieves the relation alias if it was registered with Relation::morphMap(['alias' => Model::class]) or the classname itself if no alias exists.

It accepts both classnames and objects.

Relation::morphMap([
    'invoice' => Invoice::class,
    'return_slip' => ReturnSlip::class,
]);

morph_type_of(Invoice::class));
// 'invoice'

morph_type_of(new ReturnSlip()));
// 'return_slip'

morph_type_of(App\Models\Customer::class));
// 'App\Models\Customer'

morph_type_of(new App\Models\Customer());
// 'App\Models\Customer'

Next: Concord Events »

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