barefootjs/blade

Laravel Blade rendering backend for the BarefootJS PHP runtime (barefootjs/php) -- BladeBackend implements the engine backend contract on illuminate/view standalone (Filesystem + Dispatcher + EngineResolver/BladeCompiler + FileViewFinder + Factory), ported from packages/adapter-twig/php/src/TwigBack

Maintainers

Package info

github.com/piconic-ai/barefootjs-blade

pkg:composer/barefootjs/blade

Transparency log

Statistics

Installs: 39

Dependents: 0

Suggesters: 0

Stars: 0

v0.26.2 2026-07-22 01:44 UTC

README

Laravel Blade rendering backend (Barefoot\BladeBackend) for the BarefootJS PHP runtime.

This package targets illuminate/view (used standalone -- no Laravel application/container required) and pairs with the @barefootjs/blade compile-time adapter, which emits .blade.php templates that call the runtime as a $bf object ({{ $bf->scope_attr() }}, {{ $bf->json($x) }}, {{ $bf->spread_attrs($bag) }}).

The engine-agnostic runtime itself (Barefoot\BarefootJS, Evaluator, SearchParams, Json) lives in a separate package, packages/adapter-php (barefootjs/php on Composer) -- see that package's README for the backend contract every PHP engine adapter (Twig, Blade, ...) implements.

This package is maintained in the BarefootJS monorepo and is mirrored to a Packagist-facing repository only for Composer distribution.

Do not send implementation pull requests to the Packagist mirror. Send changes to the monorepo path above; the release workflow splits this directory and pushes the mirror automatically.

Tests

php tests/test_render.php

A live end-to-end Blade render (scope markers, hydration attrs, text slots, autoescaping, spread_attrs, reserved-word mangling). Needs illuminate/view installed (composer install); skips gracefully with a notice (not a failure) when vendor/autoload.php is absent. The engine-agnostic runtime's own test suite (golden helper vectors, evaluator vectors, spread_attrs, omit, render_child, ...) lives in packages/adapter-php/tests — run with php packages/adapter-php/tests/run.php.