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
42
source/docs/v3/installation.blade.md
Normal file
42
source/docs/v3/installation.blade.md
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
title: Installation
|
||||
extends: _layouts.documentation
|
||||
section: content
|
||||
---
|
||||
|
||||
# Installation
|
||||
|
||||
Require the package using composer:
|
||||
|
||||
```php
|
||||
composer require stancl/tenancy:3.x-dev
|
||||
```
|
||||
|
||||
Then run the following command:
|
||||
|
||||
```php
|
||||
php artisan tenancy:install
|
||||
```
|
||||
|
||||
It will create:
|
||||
|
||||
- migrations
|
||||
- a config file (`config/tenancy.php`),
|
||||
- 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:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
And finally, 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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue