topthink/think-multi-app
topthink/think-multi-app adds multi-application support to ThinkPHP, letting one codebase serve separate apps with independent routing, controllers, and configuration. It enables app-aware URL dispatch and domain binding for cleaner multi-site projects.
admin, api, web, partner) gets its own app directory, namespace, config, routes, middleware, and views. It makes "carve out a separate surface" a routing decision rather than a platform rewrite.index.php glue plus custom routing). The alternative buys are nginx-level splitting into separate codebases, or nwidart/laravel-modules-style module boundaries — which only apply if you're not on ThinkPHP.example.com/admin) vs. subdomain (admin.example.com) a first-class product decision, which in turn drives cookie scoping, SEO, and CDN/cache configuration.Consider it when:
top-think organization — acceptable for commercial use and redistribution.Look elsewhere when:
For executives: This is a small, free, Apache-2.0 extension maintained by the official ThinkPHP 6 team that lets a single codebase serve several products — admin console, public API, partner portal — as cleanly partitioned applications. It is the inexpensive option that defers the expensive decision of splitting into separate services, and it is reversible: any app can later be promoted to its own deployment. Two caveats to state plainly. First, it is ThinkPHP-specific; if we standardize on Laravel it is irrelevant. Second, with roughly 20 stars it carries little external validation — our confidence rests on the maintainer organization, not the community. Net: low cost, low lock-in, but not a substitute for due diligence on the framework choice itself.
For engineering: Multi-app dispatch for ThinkPHP 6 — resolves an app namespace from domain or path prefix and keeps configs, routes, middleware, and views isolated per app, on a standard single deploy. Integration cost is near zero: one Composer dependency plus a directory convention and entry-point configuration. Architecturally it is the modular-monolith middle ground — you get real boundaries without distributed-systems overhead, and each app is a clean extraction candidate later. The principal risk is ecosystem concentration (Chinese-language docs, thinner third-party supply), not code risk; the dependency surface is small and the license is permissive.
How can I help you explore Laravel packages today?