mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
[2.1.0] Nova integration (#29)
* [2.1.0] Nova integration * Add nav link to Nova integration * Note about nova migrations
This commit is contained in:
parent
fd1ca2fb10
commit
388d21bb46
2 changed files with 37 additions and 0 deletions
|
|
@ -96,6 +96,7 @@ return [
|
|||
'children' => [
|
||||
'Spatie Packages' => 'spatie',
|
||||
'Horizon' => 'horizon',
|
||||
'Nova' => 'nova',
|
||||
'Telescope' => 'telescope',
|
||||
],
|
||||
],
|
||||
|
|
|
|||
36
docs/source/v2/nova.blade.md
Normal file
36
docs/source/v2/nova.blade.md
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
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
|
||||
```
|
||||
> Note: Unfortunately, Nova will still be adding its migrations to your central migrations. This is something we'd like to solve in the future.
|
||||
- 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