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

Blade Laravel Package

duncan3dc/blade

duncan3dc/blade brings Laravel's Blade templating engine to any PHP project without Laravel. Render views with familiar Blade syntax, directives, layouts, includes, and caching, making it easy to add clean, reusable templates to standalone apps, scripts, or legacy codebases.

View on GitHub
Deep Wiki
Context7

Use Blade templates without the full Laravel framework

Frequently asked questions about Blade
How do I install duncan3dc/blade in a standalone PHP project?
Install it with Composer by requiring duncan3dc/blade, then instantiate the package wrapper and point it at writable view and compiled-template cache directories. You do not need to install the full Laravel framework. A small render call can then output a Blade view with an array of data.
Which PHP and Illuminate versions does duncan3dc/blade support?
duncan3dc/blade wraps illuminate/view, so its compatibility is tied to the PHP and Illuminate versions it allows. Pin the package and its Illuminate dependencies together and test against your target PHP runtime. Check the current Composer constraints rather than assuming support for every Laravel version.
Does duncan3dc/blade support Blade layouts, includes, components and custom directives?
It supports familiar Blade syntax including layouts, includes, directives and compiled-template caching. Components, slots and custom directives depend on the underlying Illuminate View version, so verify the exact features you need in a proof of concept. Most standard Blade template patterns should carry over.
Can I use duncan3dc/blade without installing Laravel?
Yes. duncan3dc/blade is purpose-built to provide Blade as a standalone view layer without routing, dependency injection, ORM, auth or other Laravel framework pieces. It is not a Laravel replacement, but it lets standalone PHP apps and legacy code use Blade templates.
How do I configure view and compiled template cache paths with duncan3dc/blade?
Configure one writable directory for your Blade view files and a separate writable directory for compiled templates. Keep both outside the public web root and isolate the cache per environment or tenant. Ensure filesystem permissions and opcache settings are correct before rendering in production.
Is duncan3dc/blade suitable for production use?
Rendering risk is generally low, but dependency and maintenance risk is moderate because the package is a small wrapper tied to Illuminate/View releases. It has a niche ecosystem footprint and no implied commercial support, so plan for internal ownership. Pin dependencies, warm compiled templates, add render and escaping tests, and monitor template errors in production.
How do I deploy and precompile Blade templates with duncan3dc/blade?
Treat compiled Blade templates as build artifacts: precompile or warm the cache during deployment and enable opcache. For horizontal scaling, use shared cache storage or bake the compiled cache into your images. Avoid compiling templates on every request in production.
What Laravel helpers are missing when using Blade outside Laravel?
Blade outside Laravel will not have the full set of Laravel helpers and framework facilities available. You will likely need local helper or directive shims for templates that depend on Laravel-only functions. Laravel's Blade documentation is largely applicable, but standalone edge cases may require reading the package and Illuminate source.
How does duncan3dc/blade compare to Twig or using full Laravel?
Choose duncan3dc/blade when you specifically want Blade syntax or need to reuse Laravel-origin templates in a non-Laravel PHP app. It is unnecessary inside a full Laravel application and may be a poor fit where Twig or Symfony conventions already dominate. It is a presentation-layer tool, not a framework replacement.
How do I test Blade rendering and escaping with duncan3dc/blade?
Add render tests for representative templates, including layouts, includes, custom directives and escaping behavior. Include template smoke tests in deployment checks and verify that user content is escaped unless explicitly trusted. A proof of concept with your real templates is the best way to catch missing helpers or unsupported features.
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.
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
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource