Update passport.blade.md (#128)

Fixed using Passport in both the central and tenant app
This commit is contained in:
David SP 2021-06-01 13:52:20 +02:00 committed by GitHub
parent 4038f81302
commit d59c25ee15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,7 +87,25 @@ And again, you need to create clients in your tenant database seeding process.
## Using Passport in both the central & tenant app {#using-passport-in-both-the-central-and-tenant-app} ## Using Passport in both the central & tenant app {#using-passport-in-both-the-central-and-tenant-app}
![Passport for both central & tenant app](/assets/images/passport_universal.png) To use Passport on central and tenant application, you may apply the following changes.
- Remove this from the `register` method in your `AppServiceProvider` if you added it previously:
```php
Passport::ignoreMigrations();
```
- Configure `Passport routes` on the `register` method in your `AppServiceProvider` as follows:
```php
Passport::routes(null, ['middleware' => [
'universal',
InitializeTenancyByDomain::class
]]);
```
- Make a copy of `Passport migrations` to `database/migrations/tenant/` directory
And make sure you enable the *Universal Routes* feature. And make sure you enable the *Universal Routes* feature.