edalzell/blade-directives
A handy collection of custom Laravel Blade directives that add convenient shortcuts for common template logic, conditionals, debugging, and more, helping you write cleaner, more readable views without extra PHP.
Architecture fit
edalzell/blade-directives (published as statamic-blade) is a Statamic addon that bridges Statamic's Antlers-first rendering model into Laravel's Blade compiler. Architecturally it is a thin, idiomatic Laravel package: a service provider registers custom Blade directives that proxy into Statamic's content/rendering APIs. For a team standardized on Laravel + Blade, this is a natural seam — it lets Blade templates call into Statamic without forcing Antlers syntax into the view layer. The fit is strongest when Statamic is already the CMS and the application layer is conventional Laravel (controllers, Blade views, Livewire components). It is a poor fit if the team is committed to Antlers, or if views are rendered by Inertia/Vue where Blade directives have no runtime.
Integration feasibility Low effort to install (Composer + provider auto-discovery), but the real feasibility question is directive coverage and version alignment. Expect to spend a spike validating: (a) which directives the package actually exposes, (b) whether they resolve against the Statamic version in use, and (c) whether composed output (nested Antlers inside Blade, or Blade inside Antlers) round-trips cleanly. The lack of stars and dependents means there is no community-validated compatibility matrix — compatibility must be established by the team, not assumed.
Technical risk This is the dominant concern and should be surfaced to stakeholders plainly: a single-maintainer, near-zero-adoption package sitting in the critical rendering path. Risks ranked:
Key questions
composer.json, and are they still resolvable?view:cache?Stack fit
Assumes Laravel (8/9/10-era) with Statamic 3/4 installed and Blade as the view engine. If the project already mixes Antlers and Blade, this package is additive and non-invasive. If the project is Antlers-only, adopting it implies a deliberate decision to move view authoring to Blade — which is a team-skills decision as much as a technical one. Confirm the existing config/view.php and Statamic's view resolution before assuming directives will be picked up in every template context (e.g., Statamic's control-panel views vs. app views).
Migration path Incremental and reversible, which is the package's main strategic value:
Compatibility
Treat version pinning as a gating item. Verify the package's composer.json constraints against the target Statamic and Laravel versions before any code is written; a constraint mismatch means either an upgrade of unrelated dependencies or a fork. Also validate against PHP minor versions used in CI and production, and confirm behavior under php artisan view:cache and Statamic's static caching.
Sequencing Spike (1–2 days) → compatibility verdict → isolated page conversion → staging validation → production rollout page-by-page. Do not sequence this concurrently with a Statamic major upgrade; isolating variables matters more here than velocity, given the thin maintenance base.
Maintenance Effectively self-maintained. Plan for the package to be vendored or forked into the org's namespace the moment it becomes load-bearing. Budget a recurring line item (a few hours per Statamic upgrade) to re-verify directives, and add a smoke test that renders a page exercising every directive in use.
Support GitHub issues only, best-effort, no SLA and no commercial backing. Escalation path is internal: whoever forked it. This must be an explicit, accepted trade-off — it is not a "supported dependency" in any procurement sense.
Scaling Directive expansion happens at Blade compile time, so runtime cost is negligible once views are cached; the concern is cache invalidation correctness. Under Statamic static caching or Laravel's view cache, a directive whose output depends on request or user context can be cached incorrectly. Load characteristics are therefore fine; correctness under caching is the scaling question.
Failure modes
Ramp-up Low for anyone fluent in Laravel Blade and Statamic content APIs; moderate for Antlers-only developers, who must learn Blade syntax and the directive surface simultaneously. Recommend a short internal write-up of the supported directives and the approved usage patterns — the package's own documentation is unlikely to be comprehensive. Given zero dependents, plan for the team, not the community, to be the source of truth.
How can I help you explore Laravel packages today?