mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
1.1 KiB
1.1 KiB
| title | description | extends | section |
|---|---|---|---|
| Nova Integration | Nova Integration | _layouts.documentation | content |
Nova Integration
To use Nova inside of the tenant part of your application, do the following:
- Publish the Nova migrations and move them to the
database/migrations/tenantdirectory.php artisan vendor:publish --tag=nova-migrationsNote: 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 yournova.middlewareconfig. Example:'middleware' => [ 'tenancy', 'web', Authenticate::class, DispatchServingNovaEvent::class, BootTools::class, Authorize::class, ], - In your
NovaServiceProvider'sroutes()method, replace the following lines:
with these lines:->withAuthenticationRoutes() ->withPasswordResetRoutes()->withAuthenticationRoutes(['web', 'tenancy']) ->withPasswordResetRoutes(['web', 'tenancy'])