0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

stancl/tenancy勘違い

Last updated at Posted at 2025-02-13

Central routes

// routes/web.php, api.php or any other central route files you have

foreach (config('tenancy.central_domains') as $domain) {
    Route::domain($domain)->group(function () {
        // your actual routes
    });
}

こんなのを記載してくださいと書いてある。
どうやらこれはconfig/tenancy.phpに設定したドメインとリクエストの宛先ドメインを比較しているらしい。

リクエストを送った方のドメインと比較しているのかと思っていた。

そもそも、
Stancl/Tenancyのルーティングはリクエストの Host ヘッダーを見てcentral_domainsに定義されたドメインかどうかを判断してルートを選択するそうです。

じゃあ、reactとlaravelでapiの場合どうするんだと。宛先ドメインずっと一定だぞ

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?