Skip to content

[3.x] Migrate Blade components to inline syntax#850

Merged
pascalbaljet merged 3 commits into3.xfrom
3.x-improve-component-rendering
Mar 25, 2026
Merged

[3.x] Migrate Blade components to inline syntax#850
pascalbaljet merged 3 commits into3.xfrom
3.x-improve-component-rendering

Conversation

@pascalbaljet
Copy link
Copy Markdown
Member

The <x-inertia::app> and <x-inertia::head> Blade components were returning dynamic HTML strings from their render closures. Laravel treats these as inline Blade templates and writes a compiled cache file to storage/framework/views for each unique string.

This PR switches to static inline Blade templates with public properties for the dynamic data. The template string is always identical, so it compiles and caches exactly once. The SSR content flows through variables instead of being embedded in the template itself.

@pascalbaljet pascalbaljet merged commit 4675331 into 3.x Mar 25, 2026
46 checks passed
@pascalbaljet pascalbaljet deleted the 3.x-improve-component-rendering branch March 26, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant