update docs for laravel 11

This commit is contained in:
Samuel Štancl 2024-04-14 00:02:57 +02:00
parent 23211b1784
commit c0c47c5470
3 changed files with 23 additions and 62 deletions

View file

@ -6,9 +6,7 @@ section: content
# Installation {#installation}
> Note: Laravel 11 has a different folder structure than Laravel 10. An updated installation guide is coming soon. For now you can see [this discussion](https://github.com/archtechx/tenancy/pull/1180).
Laravel 6.0 or higher is needed.
Laravel 9.0 or higher is needed.
Require the package using composer:
@ -29,18 +27,13 @@ It will create:
- a routes file (`routes/tenant.php`),
- and a service provider file `app/Providers/TenancyServiceProvider.php`
Then add the service provider to your `config/app.php` file:
Then add the service provider to your `bootstrap/providers.php` file:
```php
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
App\Providers\TenancyServiceProvider::class, // <-- here
return [
App\Providers\AppServiceProvider::class,
App\Providers\TenancyServiceProvider::class, // <-- here
];
```
And finally, if you want to use a different central database than the one defined by `DB_CONNECTION` in the file `.env`, name your central connection (in `config/database.php`) `central` — or however else you want, but make sure it's the same name as the `tenancy.central_connection` config.