- 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.