mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 18:24:03 +00:00
[2.1.0] Nova integration
This commit is contained in:
parent
99655ea7e0
commit
030c591b16
1 changed files with 35 additions and 0 deletions
35
docs/source/v2/nova.blade.md
Normal file
35
docs/source/v2/nova.blade.md
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
title: Nova Integration
|
||||
description: Nova Integration
|
||||
extends: _layouts.documentation
|
||||
section: content
|
||||
---
|
||||
|
||||
# Nova Integration {#nova-integration}
|
||||
|
||||
To make Nova part of your tenant application, do the following:
|
||||
- Publish the Nova migrations and move them to the `database/migrations/tenant` directory.
|
||||
```none
|
||||
php artisan vendor:publish --tag=nova-migrations
|
||||
```
|
||||
- Add the `'tenancy'` middleware group to your `nova.middleware` config. Example:
|
||||
```php
|
||||
'middleware' => [
|
||||
'tenancy',
|
||||
'web',
|
||||
Authenticate::class,
|
||||
DispatchServingNovaEvent::class,
|
||||
BootTools::class,
|
||||
Authorize::class,
|
||||
],
|
||||
```
|
||||
- In your `NovaServiceProvider`'s `routes()` method, replace the following lines:
|
||||
```php
|
||||
->withAuthenticationRoutes()
|
||||
->withPasswordResetRoutes()
|
||||
```
|
||||
with these lines:
|
||||
```php
|
||||
->withAuthenticationRoutes(['web', 'tenancy'])
|
||||
->withPasswordResetRoutes(['web', 'tenancy'])
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue