Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Blade Laravel Package

philo/laravel-blade

Use Laravel's Blade template engine outside of Laravel. This package compiles .blade.php templates into plain PHP through a simple standalone API, supporting layouts, includes, directives, and caching—ideal for lightweight projects that want Blade's clean syntax without the full framework.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on templating. The real decision this package surfaces is whether to standardize on Blade's syntax (layouts, @section/@extends, @include, auto-escaping, compile-to-PHP caching) instead of hand-rolling an in-house template layer or paying for a hosted rendering service. The package itself is just the adapter that lets you make that decision without adopting Laravel as a framework — "Blade without Laravel."
  • Framework-agnostic rendering surface. Lets one template dialect serve WordPress themes, Slim/Lumen services, legacy PHP apps, CLI/scaffolding tools, and transactional email/notification rendering. That's a consolidation decision (one syntax, one mental model, one set of designer conventions), not a library decision.
  • Performance posture. Templates compile once to plain PHP and are cached on disk; no per-request parsing. Supports a "cheap rendering at high traffic" decision for marketing pages and email fan-out.
  • Multi-tenant theming. View inheritance and namespaced view finders support customer-overridable view hierarchies without building a plugin architecture — useful for white-label and per-account customization roadmap items.
  • Talent and onboarding economics. Blade is the most widely known PHP templating dialect, so standardizing on it widens the hiring pool and shortens designer handoff. This is a genuine roadmap input when comparing against Twig.
  • Deprecation/consolidation decision. The 2015 last release and zero Packagist dependents force an explicit call: vendor it, fork it, or migrate to illuminate/view. That migration is a roadmap line item, so it belongs in planning.
  • Does not support decisions about PHP 8+, Blade Components, slots, @once, or modern Laravel versions — it predates all of them.

When to Consider This Package

Consider it when:

  • You have a pre-2017 PHP codebase already depending on philo/laravel-blade and the cheapest near-term path is pinning PHP while planning a contained migration.
  • You need Blade in a non-Laravel app and are surveying options — but treat this repo as a reference implementation to read, not a dependency to install. The maintained answers are illuminate/view (first-party, versioned with Laravel) or jenssegers/blade (maintained wrapper, same ergonomics).
  • You need lightweight rendering for internal tooling where blast radius is small and maintenance risk is acceptable.

Look elsewhere when:

  • Greenfield. Use illuminate/view + illuminate/events directly — same API, current PHP support, security patches, Blade Components for free. Wrap it yourself in ~30 lines; that's essentially all this package is.
  • You need modern Blade. Components, slots, @once, @push semantics from Laravel 6+ are absent.
  • Untrusted or user-authored templates. Blade compiles to raw PHP and offers no sandbox. Use Twig, or a logic-less engine (Mustache/Liquid), or a hosted service. This is a security boundary, not a preference.
  • Vendor governance applies. Procurement, SOC2/ISO, or an SLA on dependency maintenance: a decade-old release with no active maintainer fails review. Zero dependents is a signal, not a comfort.
  • You only need string interpolation. sprintf/strtr beats pulling in a compiler.

How to Pitch It (Stakeholders)

For executives (60 seconds). We're evaluating whether to standardize HTML rendering on Blade, Laravel's template engine, without adopting the Laravel framework. The upside is real: one template language across web, email, and internal tools; templates compile to plain PHP so there's no per-request parsing cost; and Blade is the most widely known PHP templating syntax, which broadens hiring and speeds designer handoff. The specific open-source wrapper in front of us is stale — last release 2015, no active maintainer, zero downstream dependents. So the recommendation is not to adopt this package. It's to adopt the engine behind it through Laravel's official standalone component (illuminate/view) or the maintained jenssegers/blade wrapper: identical capability, current PHP support, security patches included. The strategic call — standardize on Blade — is sound and low-risk. The tactical call — use this library — is not. Cost is effectively zero either way; the risk we're avoiding is a stranded dependency discovered two years from now during a PHP upgrade.

For engineering. Treat the repo as documentation, not a dependency. What it does — wiring an Illuminate\View\FileViewFinder, EngineResolver, BladeCompiler, a cache path, and a container — is roughly thirty lines you can own directly against illuminate/view, a first-party package that ships on Laravel's release cadence and gives you Components, @once, and PHP 8 compatibility without extra work. If you want a maintained drop-in with the same developer ergonomics, jenssegers/blade tracks current Laravel. If you're already running philo/laravel-blade in production, put it on the deprecation list now: pin the PHP version, funnel every render call through a single Renderer interface, then swap the implementation to illuminate/view as a contained refactor rather than an emergency. One hard constraint — do not use Blade (this package or the official one) for untrusted or user-authored templates; it compiles to raw PHP with no sandbox. Twig is the requirement in that case.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console