mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 18:24:03 +00:00
Provide exempt_domains examples (#44)
* Provide exempt_domains example When I was setting this up, I noticed that using the https protocol would cause the package to throw an exception. After a bit of tinkering, I realized that the domain needs to be completely stripped (no protocol) in order for the central app to recognize it. This PR just adds a simple example to the docs for this. * Update central-app.blade.md * Update central-app.blade.md * Update docs/source/v2/central-app.blade.md Co-Authored-By: Samuel Štancl <samuel.stancl@gmail.com> * Update docs/source/v2/configuration.blade.md * ` instead of ``` * ` instead of ``` Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
This commit is contained in:
parent
cffbb8d1cb
commit
b212434990
2 changed files with 3 additions and 1 deletions
|
|
@ -17,6 +17,8 @@ Routes in the `routes/web.php` file are the central routes. When they are visite
|
||||||
|
|
||||||
However, since you don't want routes related to the app on your main domain and sign up forms on tenant domains, you must also define what domains host the central stuff in the `tenancy.exempt_domains` config.
|
However, since you don't want routes related to the app on your main domain and sign up forms on tenant domains, you must also define what domains host the central stuff in the `tenancy.exempt_domains` config.
|
||||||
|
|
||||||
|
The exempt domains should not include the protocol. For example, you should include `example.com` rather than `https://example.com`.
|
||||||
|
|
||||||
## Using central things inside the tenant app {#using-central-things-inside-the-tenant-app}
|
## Using central things inside the tenant app {#using-central-things-inside-the-tenant-app}
|
||||||
|
|
||||||
To use central things (databases/caches/Redis connections/filesystems/...) on special places of your tenant app, you may do the following.
|
To use central things (databases/caches/Redis connections/filesystems/...) on special places of your tenant app, you may do the following.
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ Controller namespace used for routes in `routes/tenant.php`. The default value i
|
||||||
|
|
||||||
### `exempt_domains` {#exempt-domains}
|
### `exempt_domains` {#exempt-domains}
|
||||||
|
|
||||||
If a hostname from this array is visited, the `tenant.php` routes won't be registered, letting you use the same routes as in that file.
|
If a hostname from this array is visited, the `tenant.php` routes won't be registered, letting you use the same routes as in that file. This should be the domain without the protocol (i.e., `example.com` rather than `https://example.com`).
|
||||||
|
|
||||||
### `database` {#database}
|
### `database` {#database}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue