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
Multi Site Bundle

Multi Site Bundle Laravel Package

freshheads/multi-site-bundle

A Symfony bundle for running multiple websites from one codebase, with per-site configuration, routing, and content isolation. Simplifies multi-site management without duplicating application logic.

View on GitHub
Deep Wiki
Context7

Freshheads MultiSiteBundle is a Symfony bundle for running multiple websites from a single application. It resolves the active site from the incoming request (typically by host or domain) and exposes that context throughout your application, so each site can have its own configuration, templates, and routes without duplicating code.

  • Host-based site resolution from the current request
  • Per-site configuration and settings
  • Site-aware routing and controllers
  • Simple service access to the active site
  • Lightweight integration with standard Symfony services
Frequently asked questions about Multi Site Bundle
Can I install freshheads/multi-site-bundle in Laravel?
No, not as a working dependency. It is a Symfony bundle built around Symfony bundle registration, a DI extension, and Symfony routing lifecycle, none of which Laravel boots. You can read it as a design reference, but Composer installation will not give you functional multi-site routing in a Laravel app.
Does this package support Laravel 10 or 11?
No. Laravel 10 and 11 ship Symfony components, but they do not run Symfony bundles or the framework-bundle boot process this package expects. Even though Illuminate Routing Route extends Symfony's Route, the bundle's compiler passes and route loaders have no Laravel equivalent.
What is freshheads/multi-site-bundle used for?
It is a Symfony bundle for running multiple sites from one application, with site configuration and routing strategies for domains and subsites. It targets Symfony's bundle and dependency injection system rather than Laravel. Treat it as a reference implementation for a site registry and request-to-site resolution.
How do I install freshheads/multi-site-bundle?
In a Symfony application you would install it with Composer and register FHMultiSiteBundle in config/bundles.php, then configure sites through the bundle's configuration tree. Check composer.json for PHP and Symfony version constraints before trying it. It is not installed into Laravel through a service provider.
How does site resolution work in this bundle?
The bundle is designed to map an incoming request to a configured site, typically by host and possibly path prefix, then apply site-specific routing and settings. The exact resolver and strategy interfaces should be confirmed in the source before relying on them. That resolver concept is the most portable part for a Laravel port.
Is freshheads/multi-site-bundle actively maintained?
The last release noted is 2024-06-05, with 2 stars and 0 dependents, so there is little ecosystem pressure or community review. It appears to be a single-vendor artifact rather than a widely maintained upstream. Do not assume timely patches or third-party security review.
What are Laravel alternatives to this Symfony bundle?
For simple cases, Laravel's built-in Route domain groups plus middleware cover per-site domains and settings. For full tenancy, evaluate established multi-tenant packages rather than porting a Symfony bundle. The right choice depends on whether you need a shared database, separate databases, or only site-specific config and routes.
How do I implement per-site domains in Laravel without this bundle?
Define a sites config file, bind a SiteResolver singleton, and add a ResolveSite middleware that maps the request host to the current site. Register route groups with Route domain per site or use a route service provider that loads site-specific files. Keep locale, view namespace, and URL generation scoped to the resolved site.
Does this bundle isolate cache, sessions, and cookies per site?
That behavior is not guaranteed by the package description and should be verified in the source; such concerns are often left to the host application. In Laravel you would need to partition cache prefixes, session cookie domains, and cookie scopes yourself. Do not assume the bundle provides full tenant isolation.
Can I port the bundle's routing strategy to Laravel?
Yes, conceptually, but port the design rather than the code. A small spike can lift the site registry and resolver ideas into config sites.php, a ResolveSite middleware, and Route domain groups. Avoid building an adapter shim, because the Symfony bundle lifecycle will not map cleanly onto Laravel's service providers and router.
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.
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
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core