miko/laravel-latte
Brings the Latte templating engine to Laravel, letting you use Latte's intuitive syntax, automatic escaping, and template inheritance alongside Blade for safer, cleaner views.
Architecture fit. Latte is a mature, compiled PHP templating engine (Nette ecosystem) with context-aware auto-escaping and a syntax that diverges meaningfully from Blade. Laravel's View layer is pluggable — a package can register a custom engine, view finder, and compiler through a service provider — so the integration surface is legitimate and well-defined rather than a hack. The fit is strongest where Latte's strengths map to a real need: server-rendered documents, transactional emails, PDF/invoice generation, and teams that already carry Nette/Latte expertise. It is a poor fit as a wholesale Blade replacement for a standard Laravel shop, because you would be trading the native, best-documented path for a 4-star package with zero dependents.
Integration feasibility. Low-to-moderate. The mechanism (custom ViewEngine, ViewFinder, service provider registration) is standard Laravel, so a spike is cheap and reversible. The real work is not wiring the engine but reconciling behavioral differences: escaping model, component/slot semantics, view composers, shared data, and Blade directives that have no Latte equivalent. Confirm whether the package exposes Blade-component parity or only raw engine registration.
Technical risk. Elevated and concentrated in maturity, not architecture. Signals: 4 stars, 0 dependents, a single maintainer, and a recency of release that suggests activity but not a community. The underlying Latte engine is battle-tested; the Laravel adapter is not. This is a bus-factor-1 dependency on a thin glue layer — the exact profile that should be vendored or forked rather than consumed blindly. Blast radius is high if adopted broadly, since a view engine sits on the rendering path of every request.
Key questions.
@include-style composition, and shared data, or only bare template rendering?{{ }}/{!! !!} conventions — can both coexist in one app?Stack fit. Adopt only if one of two conditions holds: (a) the team already has Latte/Nette fluency, or (b) the target workload is document/email/PDF rendering where Latte's escaping and macro system genuinely outperform Blade. For mainstream web UI in a Blade-native team, the switching cost and dependency risk are not justified by the package's maturity. Treat this as a targeted tool, not a framework-wide decision.
Migration path. Do not adopt as a Blade replacement. Use a strangler pattern: introduce Latte for new, isolated view families (emails, PDF templates, a single bounded module), keep Blade as the default engine, and run both side by side. Prove parity and developer velocity on low-risk surfaces before expanding. A full swap should be an explicit, later decision backed by that evidence.
Compatibility. Verify three axes before writing code: Laravel major (view engine API has changed across releases), Latte major (3.x), and PHP version floor. Pin exact versions and record the tested matrix in your repo. Since dependents are zero, you are the de facto integration tester — budget for that.
Sequencing.
Maintenance. The primary ongoing cost. With one maintainer and no dependents, you inherit the maintenance relationship. Mitigate by vendoring the adapter into the repo (it is small), pinning the Latte major, and assigning an internal owner. Track upstream releases; assume you may need to carry a patch for a Laravel major bump.
Support. No vendor support and a small community relative to Blade. Escalation path is the Nette/Latte community for engine issues and your own team for adapter issues. Budget internal expertise — ideally at least one engineer fluent in Latte — or the dependency becomes an orphaned liability.
Scaling. Not a scaling concern. Latte is compiled and cached, so runtime performance is comparable to Blade; throughput depends on cache configuration, not the engine choice. The scaling risk is organizational: template knowledge concentrates in one or two engineers.
Failure modes.
Ramp-up. Moderate. Latte's syntax, macros, and escaping model are learnable but distinct from Blade; expect a real onboarding cost and documentation burden for a team without prior exposure. Plan for a short internal enablement before the pilot, and keep the pilot scope small enough that a single engineer can own it end to end.
TPM verdict. Architecturally sound, operationally thin. Approve for a bounded pilot where Latte expertise or a genuine document-rendering need exists, with mandatory vendoring, version pinning, and CI template rendering. Reject as a default or org-wide Blade replacement at the current maturity level.
How can I help you explore Laravel packages today?