Weave 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
Statamic Kontainer

Statamic Kontainer Laravel Package

jezzdk/statamic-kontainer

A Statamic addon for Laravel projects that adds Kontainer support, helping you organize and manage reusable content containers in the control panel. It integrates with Statamic’s field and content APIs for flexible, developer-friendly content structures.

View on GitHub
Deep Wiki
Context7

jezzdk/statamic-kontainer is a lightweight service container add-on for Statamic that gives you a simple, fluent way to register and resolve classes, interfaces, and shared instances across your add-ons and application code.

It helps keep Statamic projects decoupled by centralizing bindings instead of hard-coding dependencies. Register bindings and singletons, then resolve them wherever needed—keeping configuration explicit, reusable, and testable.

  • Fluent API for registering class and interface bindings
  • First-class support for singletons and shared instances
  • Resolve dependencies on demand from anywhere in your app
  • Integrates cleanly with Statamic's add-on lifecycle
  • Lightweight, with no configuration required to get started
Frequently asked questions about Statamic Kontainer
What is Kontainer and what does it do in Statamic?
Kontainer is a Statamic addon that lets you group related, reusable content into containers instead of scattering it across the page tree. Editors manage those containers from the control panel while developers render them with simple template tags, so site structure stays tidy as content grows. It targets modular, editor-friendly content workflows without heavy configuration.
How do I install jezzdk/statamic-kontainer with Composer?
Install it like any Statamic addon by running composer require jezzdk/statamic-kontainer from your project root, then let Statamic's addon discovery pick it up. Check the repository README for the supported package version and any post-install steps such as publishing config or running migrations. Commit the updated composer.json and composer.lock so other environments stay in sync.
How do I configure Kontainer in the Statamic control panel?
Configuration happens inside the Statamic control panel, where you define the containers and the fields editors use to fill them. The addon is designed to work without a complex setup, so most teams can start with sensible defaults and refine as content needs grow. The repository README is the authoritative source for the available settings.
Which Statamic and Laravel versions does Kontainer support?
Because Kontainer is a Statamic addon, its compatibility tracks Statamic's release line rather than Laravel's directly, though Statamic itself requires a matching Laravel version. Check the composer.json constraints and the README in the GitHub repository for the currently supported Statamic and PHP versions before upgrading. Pinning versions in composer.lock is the safest way to avoid surprises.
When should I use Kontainer instead of the Replicator or Bard fieldtypes?
Use Kontainer when the same block of content needs to appear in several places and editors should only have to edit it once. Statamic's Replicator and Bard fieldtypes are for composing content within a single entry, whereas Kontainer is about reusable groups shared across the site. If your content is strictly per-entry, the built-in fieldtypes are usually simpler.
Does Kontainer require changes to my existing Statamic templates?
You will typically add or adjust Antlers or Blade templates to output container content, but the addon is intended to keep templates simple rather than add complexity. Existing entries and templates are not automatically restructured, so have a migration plan if you move current content into containers. Review the README examples for the exact rendering syntax.
Is Kontainer safe for production sites and does it affect performance?
Kontainer stores its data through Statamic's normal content and caching layers, so it should behave like the rest of your site in production. Enable Statamic's static or response caching as you normally would, and load-test after importing large container sets. Watch for stale cache after edits and clear it as part of your deploy routine.
How do I test a Laravel and Statamic site that uses Kontainer?
Statamic addons are usually exercised with Pest or PHPUnit inside a Laravel test suite, and you can assert that rendered output contains the expected container content. For editor-facing behaviour, add a control-panel test or a browser smoke test. If you contribute to the addon itself, run its own test suite as described in the repository.
What are the alternatives to Kontainer for reusable content in Statamic?
Alternatives include building reusable groups with Statamic globals, using the Replicator fieldtype with shared sets, or writing a small custom addon that fits your exact model. Kontainer's advantage is a ready-made, editor-friendly container concept with minimal configuration. Compare the data model each option produces before committing, since switching later means content migration.
Is jezzdk/statamic-kontainer actively maintained and where do I report issues?
Maintenance activity is best judged from the GitHub repository's commit history, releases, and open issues for jezzdk/statamic-kontainer. If it looks quiet, verify that your current Statamic version is still supported before adopting it. Report bugs or feature requests through the repository's issue tracker and include your Statamic and PHP versions.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console