当前位置: 首页 > 软件库 > Web应用开发 > Web框架 >

multi-tenant

授权协议 MIT License
开发语言 PHP
所属分类 Web应用开发、 Web框架
软件类型 开源软件
地区 不详
投 递 者 东方和煦
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Join our Discord server

The unobtrusive Laravel package that makes your app multi tenant. Servingmultiple websites, each with one or more hostnames from the same codebase. Butwith clear separation of assets, database and the ability to override logic pertenant.

Suitable for marketing companies that like to re-use functionalityfor different clients or start-ups building the next software as aservice.


Offers:

  • Integration with the awesome Laravel framework.
  • Event driven, extensible architecture.
  • Close - optional - integration into the web server.
  • The ability to add tenant specific configs, code, routes etc.

Database separation methods:

  • One system database and separated tenant databases (default).
  • Table prefixed in the system database.
  • Or .. manually, the way you want, by listening to an event.

Complete documentation covers more than just theinstallation and configuration.

Requirements, recommended environment

  • Laravel 8.0+.
  • PHP 7.3+
  • Apache or Nginx.
  • MySQL, MariaDB, or PostgreSQL.

Please read the full requirements in the documentation.

Installation

composer require hyn/multi-tenant

Automatic service registration

Using auto discovery, thetenancy package will be auto detected by Laravel automatically.

Manual service registration

In case you want to disable webserver integration or prefer manual integration,set the dont-discover in your application composer.json, like so:

{
    "extra": {
        "laravel": {
            "dont-discover": [
                "hyn/multi-tenant"
            ]
        }
    }
}

If you disable auto discovery you are able to configure the providers by yourself.

Register the service provider in your config/app.php:

'providers' => [
        // [..]
        // Hyn multi tenancy.
        Hyn\Tenancy\Providers\TenancyProvider::class,
        // Hyn multi tenancy webserver integration.
        Hyn\Tenancy\Providers\WebserverProvider::class,
    ],

Deploy configuration

First publish the configuration and migration files so you can modify it to your needs:

php artisan vendor:publish --tag tenancy

Open the config/tenancy.php and config/webserver.php file and modify to your needs.

Make sure your system connection has been configured in database.php. In case you didn't override the system connection name the default connection is used.

Now run:

php artisan migrate --database=system

This will run the required system database migrations.


Backers

Thank you to all our backers! �� [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Contributors


License and contributing

This package is offered under the MIT license. In case you're interested atcontributing, make sure to read the contributing guidelines.

Testing

Run tests using:

vendor/bin/phpunit

If using MySQL, use:

LIMIT_UUID_LENGTH_32=1 vendor/bin/phpunit

Please be warned running tests will reset your current application completely, dropping tenant and systemdatabases and removing the tenancy.json file inside the Laravel directory.

Changes

All changes are covered in the changelog.

Contact

Get in touch personally using;

  •       在这个“云”山雾罩的时代,“多租户”是一个重要的概念,无论是公有云还是私有云,多租户的支持是必须的。那么什么是多租户呢? 多租户是指软件架构支持一个实例服务多个用户(Customer),每一个用户被称之为租户(tenant),软件给予租户可以对系统进行部分 定制的能力,如用户界面颜色或业务规则,但是他们不能定制修改软件的代码。       由于共享开发和维护成本,都某些用户来说,多租户

  • multi-tenant系统在很早很早以前就有,比如微软MSDN,在06年就发表了multi-tenant系统设计方面概述性的文章 在多租户技术中,租户(tenant)是指使用系统或电脑运算资源的客户,但在多租户技术中,租户包含在系统中可识别为指定用户的一切数据,举凡帐户与统计信息(accounting data),用户在系统中建置的各式数据,以及用户本身的客制化应用程序环境等,都属于租户的范围,

  •                   做为SaaS的基本特征,多租户对系统的很多方面都产生了很多深远的影响.就数据层面的架构来说,基本上分成了多租户共享单一数据库、单一租户独享单一数据库以及介于两者之间的单一数库下的单一租户独享单一schema三种方案。这篇文章 http://msdn.microsoft.com/en-us/library/aa479086.aspx 对三种架构方案做了全面和细致的

 相关资料
  • 7.1n-step TD Prediction The methods that usen-step backups are still TD methodsbecause theystill change an earlier estimate based on how it differs from a later estimate. n-step return:If t+n≥T(if the

  • MULTI 标记一个事务块的开始。 事务块内的多条命令会按照先后顺序被放进一个队列当中,最后由 EXEC 命令原子性(atomic)地执行。 可用版本: >= 1.2.0 时间复杂度: O(1)。 返回值: 总是返回 OK 。 redis> MULTI # 标记事务开始 OK redis> INCR user_id # 多条命令按顺序入队 QUEUED redis

  • MULTI 标记一个事务块的开始。 事务块内的多条命令会按照先后顺序被放进一个队列当中,最后由 EXEC 命令原子性(atomic)地执行。 可用版本: >= 1.2.0 时间复杂度: O(1)。 返回值: 总是返回 OK 。 redis> MULTI # 标记事务开始 OK redis> INCR user_id # 多条命令按顺序入队 QUEUED redis

  • 描述 (Description) 它通过将data-multi-expand为true,一次打开多个手风琴窗格。 例子 (Example) 以下示例演示了在基础中使用multi-expand accordion - <!doctype html> <head> <meta charset = "utf-8" /> <meta http-equiv = "x-ua-co

  • Multi-OTP 是一个PHP类,用来进行基于 OTP 一次性密码的用户 token 的强认证和管理。可创建、更新、删除 token,用户数据存储在单个文件中。可使用多种算法进行用户检查,包括 Mobile OTP (MOTP), OATH/HOTP (RFC 4226), and OATH/TOTP HOTP Time Based (RFC 4226 extension). 兼容 (iPhon

  • Multi-Selection Live DEMO on appetize.io Check this project on dribbble Read how we did it on our blog ##Requirements Android SDK 17+ ##Usage Add to your root build.gradle: allprojects { repositories