tenancy-docs/docs/source/v2/nova.blade.md
2019-10-15 15:12:59 -04:00

1.1 KiB

title description extends section
Nova Integration Nova Integration _layouts.documentation content

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.
    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:
    'middleware' => [
        'tenancy',
        'web',
        Authenticate::class,
        DispatchServingNovaEvent::class,
        BootTools::class,
        Authorize::class,
    ],
    
  • In your NovaServiceProvider's routes() method, replace the following lines:
    ->withAuthenticationRoutes()
    ->withPasswordResetRoutes()
    
    with these lines:
    ->withAuthenticationRoutes(['web', 'tenancy'])
    ->withPasswordResetRoutes(['web', 'tenancy'])