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
Remote Template Bundle

Remote Template Bundle Laravel Package

leaseweb/remote-template-bundle

Symfony bundle that loads Twig templates from remote sources rather than the local filesystem, so views can be managed and shared across services without redeploying. Handy for centralized template storage, multi-tenant apps, and CMS-driven content.

View on GitHub
Deep Wiki
Context7

Load your (view) template from a remote site

Frequently asked questions about Remote Template Bundle
Can I install leaseweb/remote-template-bundle in a Laravel application?
No. It is a Symfony2 bundle that hooks into Symfony's bundle system, its DependencyInjection extension model, and Symfony's templating loader chain, none of which Laravel registers or runs. Composer may resolve the package, but there is no activation path inside a Laravel app, and its legacy Symfony and PHP constraints typically conflict with Laravel 10/11's PHP 8.1+ floor. Treat it as a reference design rather than a dependency.
Is there a Laravel package that loads Blade templates from a remote source?
There is no drop-in equivalent. The Laravel-native approach is a custom Illuminate\View\FileViewFinder or a View::addNamespace registration pointed at a local directory you populate from a remote origin. Most teams implement this as a small in-house Artisan sync command plus a versioned cache directory instead of adopting a package.
How do I load remote templates in Laravel without this bundle?
Fetch the templates ahead of time into a known directory such as storage/app/templates or a versioned theme folder, then register that path as a Blade namespace with View::addNamespace. Rendering stays fully local and fast, and you keep Blade's normal compilation and caching behavior. A scheduled or deploy-time Artisan command handles synchronization.
Is rendering remote Twig or Blade templates a security risk?
Yes, and it is the dominant risk. Remote template content is executable code, not static markup, so a compromised or misconfigured origin becomes server-side template injection with access to helpers, config, and in-scope models. Only first-party, signed, versioned artifacts should ever be treated as templates; tenant-supplied templates change the risk class entirely.
Does leaseweb/remote-template-bundle support Symfony 5 or 6, or PHP 8?
No. It is a Symfony2-era bundle, and Symfony 2.x reached end of life in November 2018. Its PHP constraint almost certainly predates PHP 7.4, so it will not run on Symfony 5, 6, or 7 or on PHP 8.1+, and it has no Laravel support at all.
What is the best Laravel approach for per-tenant themes or CMS-driven views?
Use per-tenant view namespaces. Register each tenant's template directory with View::addNamespace and resolve views through middleware or a view composer that selects the namespace from the current tenant. Pair it with a headless CMS or a signed artifact pull so marketing edits do not require a redeploy, and avoid resolving templates over HTTP during the request.
Should remote templates be fetched at runtime or at build time in Laravel?
Build or deploy time in almost every case. Runtime fetching puts a network dependency on the render path, so origin downtime becomes site-wide 500s and every page pays extra latency. Build-time synchronization gives you versioning, checksums, rollback, and fail-closed behavior, and most stated runtime requirements collapse to build-time on inspection.
How do I cache compiled Blade views that came from a remote source?
You get this for free if you materialize templates into a local directory and let Blade compile normally into storage/framework/views. Include a version or content hash in the directory name so a new template set compiles cleanly and old compiled views can be pruned. Run php artisan view:clear as part of the sync step if you overwrite files in place.
Is leaseweb/remote-template-bundle still maintained?
No. The repository is archived with no maintenance signal, no CVE response process, and no meaningful community usage that would surface defects. It cannot pass a modern dependency-review gate, and any outbound fetch path in a decade-old bundle should be assumed to lack redirect allowlisting and TLS verification.
How do I migrate from the Symfony remote template loader to Laravel?
You reimplement rather than port; the resulting code shares nothing with the original and inherits none of its hardening. Build a small Artisan command that pulls signed artifacts into a versioned directory, register that directory as a view namespace, and add checksum verification with a fail-closed fallback to the last known good version. Skip the runtime loader entirely unless you can document a genuine need for it.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections