mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 18:24:03 +00:00
1.2 KiB
1.2 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-migrations - Prevent Nova from adding its migrations to your central migrations by adding
Nova::ignoreMigrations()toNovaServiceProvider::boot()(Don't do this if you want to use Nova [both in the central & tenant parts]({{ $page->link('universal-routes') }}) of the app.) - 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'])