PHPackages                             karlmonson/tenant - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. karlmonson/tenant

ActiveLibrary[Database &amp; ORM](/categories/database)

karlmonson/tenant
=================

Tenant allows for storing configuration settings in the database. This package is perfect for multitenant applications.

1.2(6y ago)28142MITPHPPHP &gt;=5.5.9

Since Oct 19Pushed 6y ago2 watchersCompare

[ Source](https://github.com/karlmonson/tenant)[ Packagist](https://packagist.org/packages/karlmonson/tenant)[ RSS](/packages/karlmonson-tenant/feed)WikiDiscussions 1.0-dev Synced 2mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

Tenant
======

[](#tenant)

Tenant allows for storing configuration settings in the database. This package is perfect for multitenant applications.

Installation
------------

[](#installation)

Install via Composer:

```
$ composer require "karlmonson/tenant": "~1.0"

```

Configuration
-------------

[](#configuration)

Register the Service Provider:

```
Karlmonson\Tenant\TenantServiceProvider::class,
```

Then register the Facade:

```
'Tenant' => Karlmonson\Tenant\Facades\Tenant::class,
```

Then run migrations to create the Tenant database table:

```
php artisan migrate

```

Usage
-----

[](#usage)

### Seeding

[](#seeding)

To get started you may use the TenantTableSeeder provided by running the following command:

```
php artisan tenant:seed

```

This will seed the Tenant table with the default 3rd party config variables found the in `.env` file.

### Creating/Updating Keys

[](#creatingupdating-keys)

To store a new key/value in the Tenant table, you may use the `set` method on the Tenant Facade:

```
