livewire/blaze
Blaze speeds up Laravel Blade anonymous components by compiling templates into optimized PHP functions. Drop-in replacement with no code changes. Optional memoization and folding for extra gains. Enable via @blaze directive or optimize directories.
@blaze for anonymous components in performance-critical sections (e.g., tables, cards) with minimal risk (default function compilation).Adopt Blaze if:
Look elsewhere if:
For Executives: *"Blaze is a drop-in performance booster for Laravel apps that can cut rendering time by 90–97% for Blade components—think of it as a turbocharger for your UI. For example, a page with 25,000 components drops from 500ms to 13ms with zero code changes. This directly improves:
For Engineering Teams: *"Blaze replaces Blade’s rendering pipeline with pre-compiled PHP functions, eliminating overhead while keeping Blade syntax intact. Key benefits:
@blaze to components or optimize directories via Blaze::optimize().auth(), now(), or DB queries).
Proposal: Pilot on 5–10 high-traffic components, measure impact, then scale. Tools like Blackfire can quantify gains before full rollout."*For Developers: *"Blaze lets you optimize Blade components without rewriting them. Here’s how to start:
composer require livewire/blaze.@blaze to a simple component (e.g., <x-button>), clear views (php artisan view:clear), and verify speed.Blaze::optimize() in AppServiceProvider for bulk optimization.
Caveats:Auth::user()). Use memo for safer caching.bootstrap/cache/).
Win: Faster pages, less server load, and no major code changes."*How can I help you explore Laravel packages today?