From 45bfcb081836f9c2695ed451918dc12b7ba22cd3 Mon Sep 17 00:00:00 2001 From: Vu Quang Tam Date: Thu, 17 Sep 2020 10:39:50 +0700 Subject: [PATCH] Update quickstart.blade.md Fix central domain show 404 --- source/docs/v3/quickstart.blade.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/docs/v3/quickstart.blade.md b/source/docs/v3/quickstart.blade.md index 89f4b5a..a083a03 100644 --- a/source/docs/v3/quickstart.blade.md +++ b/source/docs/v3/quickstart.blade.md @@ -85,6 +85,22 @@ In other words, it creates & migrates the tenant's database after he's created We'll make a small change to the `app/Providers/RouteServiceProvider.php` file. Specifically, we'll make sure that central routes are registered on central domains only. ```php +public function boot() +{ + $this->configureRateLimiting(); + $this->mapWebRoutes(); // Add this to boot() + $this->mapApiRoutes(); // Add this to boot() + + $this->routes(function () { + Route::middleware('web') + ->group(base_path('routes/web.php')); + + Route::prefix('api') + ->middleware('api') + ->group(base_path('routes/api.php')); + }); +} +... protected function mapWebRoutes() { foreach ($this->centralDomains() as $domain) {