mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
3.x redesign
This commit is contained in:
parent
857122540f
commit
f8f354c323
229 changed files with 201175 additions and 22440 deletions
19
source/docs/v3/domains.blade.md
Normal file
19
source/docs/v3/domains.blade.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
title: Domains
|
||||
extends: _layouts.documentation
|
||||
section: content
|
||||
---
|
||||
|
||||
# Domains
|
||||
|
||||
Note: Domains are optional. If you're using path or request data identification, you don't need to worry about them.
|
||||
|
||||
To add a domain to a tenant, use the `domains` relationship:
|
||||
|
||||
```php
|
||||
$tenant->domains()->create([
|
||||
'domain' => 'acme',
|
||||
]);
|
||||
```
|
||||
|
||||
If you use the subdomain identification middleware, the example above will work for `acme.{any of your central domains}`. If you use the domain identification middleware, use the full hostname like `acme.com`. If you use the combined domain/subdomain identification middleware, `acme` will work as a subdomain and `acme.com` will work as a domain.
|
||||
Loading…
Add table
Add a link
Reference in a new issue