You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Boost can't render the guideline: @model and {{ }} in core.blade.php are compiled #21
Laravel Boost (v2.10) compiles each resources/boost/guidelines/*.blade.php with Blade, and fails on javaabu/forms' guideline:
Skipped 1 file that could not be rendered:
- vendor/javaabu/forms/resources/boost/guidelines/core.blade.php
The result: apps that install javaabu/forms (the React skeleton, and every next-gen package app) get no javaabu/forms guideline in AGENTS.md/CLAUDE.md.
Cause: line 10 of resources/boost/guidelines/core.blade.php:
- Bind models with `<x-forms::form :model="$model">` or `@model($model) … @endmodel`; never set `value="{{ old(...) }}"` yourself.
@model … @endmodel is the package's own conditional directive, so Blade compiles it into an if with no end (syntax error, unexpected end of file, expecting "elseif" or "else" or "endif").
{{ old(...) }} would be echoed too.
Fix: escape both: @@model($model) … @@endmodel and @{{ old(...) }}, or wrap the file's body in @verbatim … @endverbatim. A test that runs Blade::render() on the guideline would stop it coming back.
To reproduce, in an app with javaabu/forms ^2.0@dev and laravel/boost ^2.10: run php artisan boost:update -n, or Blade::render(file_get_contents('vendor/javaabu/forms/resources/boost/guidelines/core.blade.php')).
Found by javaabu/laravel-skeleton-react. Not blocking: the skill (javaabu-forms) still installs.
Fixed on next-gen in 5d05ebd and b3ad178 (PR #16). CI is green on every leg, including prefer-lowest.
Fix: the guideline body in resources/boost/guidelines/core.blade.php is in a @verbatim … @endverbatim block, so @model … @endmodel and {{ old(...) }} come through as written.
Why not @@model / @{{ }}: escaping works on laravel/boost 2.10.4, which handles Blade escapes itself, but not on 2.10.0. 2.10.0 turns each backtick into ___SINGLE_BACKTICK___ before rendering, so `@@model becomes ___@@model. Blade's directive pattern (\B@) then skips the first @ and still compiles @model. A verbatim block renders the same on every version.
Test:tests/Unit/BoostTest.php renders every .blade.php file under resources/boost with Boost's own RendersBladeGuidelines trait (laravel/boost ^2.10 is now in require-dev). It checks that the guideline isn't dropped and that its Blade examples come out intact. The prefer-lowest legs run it on boost 2.10.0 and the stable legs on 2.10.4.
Other Boost files: the skill (skills/javaabu-forms/SKILL.md, references/components.md) is Markdown, which Boost copies without rendering, so its Blade examples are safe as they are. A test checks that the guideline is the only .blade.php file there.
Activity
Escape Blade in the Boost guideline so Boost can render it (#21)
Keep the Boost guideline in a verbatim block (#21)
n4ff4h commentedon Nov 6, 2026
Fixed on
next-genin 5d05ebd and b3ad178 (PR #16). CI is green on every leg, including prefer-lowest.resources/boost/guidelines/core.blade.phpis in a@verbatim … @endverbatimblock, so@model … @endmodeland{{ old(...) }}come through as written.@@model/@{{ }}: escaping works on laravel/boost 2.10.4, which handles Blade escapes itself, but not on 2.10.0. 2.10.0 turns each backtick into___SINGLE_BACKTICK___before rendering, so`@@modelbecomes___@@model. Blade's directive pattern (\B@) then skips the first@and still compiles@model. A verbatim block renders the same on every version.tests/Unit/BoostTest.phprenders every.blade.phpfile underresources/boostwith Boost's ownRendersBladeGuidelinestrait (laravel/boost ^2.10is now in require-dev). It checks that the guideline isn't dropped and that its Blade examples come out intact. The prefer-lowest legs run it on boost 2.10.0 and the stable legs on 2.10.4.skills/javaabu-forms/SKILL.md,references/components.md) is Markdown, which Boost copies without rendering, so its Blade examples are safe as they are. A test checks that the guideline is the only.blade.phpfile there.Keep the Boost guideline in a verbatim block and render it with Boost…