- What is leafs/blade and how does it relate to Laravel Blade?
- leafs/blade is Leaf PHP's adapter for Blade, adapted from jenssegers/blade, which itself wraps illuminate/view. It is not a new templating engine; it lets Leaf use Laravel's Blade compiler through Leaf's container and bootstrapping conventions. This gives Leaf applications Blade syntax, layouts, includes, components, and automatic escaping.
- How do I install leafs/blade with Composer?
- Install it via Composer and register a view path plus a compiled-view cache directory in your Leaf bootstrap. You then wire the container and render views. The exact registration steps depend on your Leaf version, so check the README examples. No data migration or service boundary changes are needed.
- Which Laravel or illuminate/view versions does leafs/blade support?
- The package depends on illuminate/view and its transitive Illuminate support packages, so support follows the adapter's Composer constraints. The provided context does not state a tested version matrix or whether constraints are pinned or open. Verify supported PHP and illuminate/view major versions with the maintainer before committing, especially if you need a specific Laravel-generation Blade feature.
- Does leafs/blade support Blade components, slots, and custom directives?
- Blade's mature features include layout inheritance, components, slots, includes, @each, automatic escaping, and custom directives. The adapter should expose core Blade compilation, but the context does not confirm whether view composers, custom directives, or Blade components are fully wired through Leaf. Confirm the supported feature set in a spike, particularly for component-heavy UI.
- Can I use leafs/blade in production?
- It is mechanically easy to integrate, but production risk is high relative to value because the package has four stars and zero dependents, giving little ecosystem validation. The adapter is maintained by the Leaf project, while the Blade engine is maintained by Laravel on a faster major-version cadence, creating version-lag exposure. Treat it as a spike-first dependency and verify cache strategy, tested versions, and maintenance policy.
- How does compiled-view caching work in leafs/blade?
- Blade compiles templates to PHP and caches them, so the adapter needs a writable compiled-view cache directory configured during bootstrapping. The context does not specify whether leafs/blade supports runtime writes only or precompilation as a build step. Ask the maintainer or test your deployment path, especially for read-only production filesystems.
- Is leafs/blade the same as jenssegers/blade or illuminate/view?
- leafs/blade is described as Leaf's implementation of Laravel Blade, adapted from jenssegers/blade. jenssegers/blade is a standalone wrapper around illuminate/view, while leafs/blade adds Leaf container and bootstrapping conventions. Determine whether leafs/blade is a hard fork or runtime wrapper, and whether you could depend on jenssegers/blade or illuminate/view directly.
- What are alternatives to leafs/blade for Blade templating in Leaf PHP?
- Alternatives include using Leaf's native Blade-inspired view layer, depending on jenssegers/blade directly, or wiring illuminate/view yourself. Leaf's native layer avoids the Illuminate dependency graph entirely and may be sufficient for simple templates. Choose leafs/blade when you specifically need Blade-compatible components, designer familiarity, or migration from Laravel.
- How maintainable is leafs/blade, and what is the bus factor?
- The adapter layer is maintained by the Leaf project, which appears to be a small team with likely single-maintainer concentration. The underlying Blade engine is maintained by Laravel, but an illuminate/* bump or a jenssegers/blade restructure can strand the adapter. Ask about upstream sync cadence, ownership, and a stated deprecation policy before relying on it long term.
- Can I migrate from Laravel or mix leafs/blade with Leaf's native views?
- Migration is incremental because Blade and Leaf's native rendering can coexist per route during transition. A realistic sequence is one non-critical page, then one feature area, then a decision gate. There is no cutover event, dual-write, or state reconciliation, which is the package's strongest operational argument.