mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 18:24:03 +00:00
Update quickstart.blade.md
Update notice for Laravel 8
This commit is contained in:
parent
6ec4b02b14
commit
a03cf96888
1 changed files with 9 additions and 7 deletions
|
|
@ -85,13 +85,6 @@ 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
|
||||
}
|
||||
.....
|
||||
protected function mapWebRoutes()
|
||||
{
|
||||
foreach ($this->centralDomains() as $domain) {
|
||||
|
|
@ -118,6 +111,15 @@ protected function centralDomains(): array
|
|||
return config('tenancy.central_domains');
|
||||
}
|
||||
```
|
||||
In Laravel 8, call these methods manually from your RouteServiceProvider's boot() method, instead of the $this->routes() calls
|
||||
```php
|
||||
public function boot()
|
||||
{
|
||||
$this->configureRateLimiting();
|
||||
$this->mapWebRoutes(); // Add this to boot
|
||||
$this->mapApiRoutes(); // Add this to boot
|
||||
}
|
||||
```
|
||||
|
||||
## Central domains {#central-domains}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue