genealabs/laravel-multi-tenant-manager

A Laravel package to manage multi-tenants.

0.1.0 2021-08-14 18:07 UTC

This package is auto-updated.

Last update: 2024-02-14 23:37:53 UTC


README

Manage tenants and their settings in Laravel Nova.

Multi-Tenant Manager for Laravel Nova masthead image.

Requirements

Installation

  1. composer require "genealabs/nova-multi-tenant-manager:*"
  2. Add the tool to your app\Providers\NovaServiceProvider.php:
     public function tools()
     {
         return [
             // ...
             new GeneaLabs\LaravelMultiTenantManager\NovaMultiTenantManager,
             // ...
         ];
     }

Planned Features

  • Configurable settings fields (implemented, needs documentation).
  • Automatic integration with genealabs/laravel-governor.
  • Extendible classes to allow custom integration with 3rd-party packages.
  • Integrate CLI commands into tenancy namespace.
  • Add unit tests.

Usage

CLI Commands

tenant:create

Creates a tenant with the provided domain name.

php artisan tenant:create <name> <domain>

tenant:alias

Creates an alias for an existing tenant with the provided domain name.

php artisan tenant:alias <domain> <alias>

tenant:delete

Deletes tenant by the provided domain, or delete all tenants.

php artisan tenant:delete <domain>
php artisan tenant:delete --all

Nova Tools

Tenants Management

Screen Shot 2019-05-11 at 5 19 20 PM

Tenant Settings

Screen Shot 2019-05-11 at 5 19 07 PM