PHPackages                             sniper7kills/tenant-helper - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sniper7kills/tenant-helper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sniper7kills/tenant-helper
==========================

A package to help setup and create files when using tenancy/tenancy

02PHP

Since Aug 24Pushed 6y ago1 watchersCompare

[ Source](https://github.com/sniper7kills/tenant-helper)[ Packagist](https://packagist.org/packages/sniper7kills/tenant-helper)[ RSS](/packages/sniper7kills-tenant-helper/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Tenant Helper
=============

[](#tenant-helper)

This package is intended to help when developing with the `tenancy/tenancy` package.

Pre-Install
-----------

[](#pre-install)

If you plan on changing the app name, it is recommended that you do so before using this package.

***Running the below command will NOT update the namespace on any files created by this project***

```
php artisan app:name

```

Setup &amp; Use
---------------

[](#setup--use)

**Installation**

```
composer require sniper7kills/tenant-helper --dev

```

**Setup folder structure**

```
php artisan tenant:init

```

**Setup Composer**

Update the `autoload` section of your `composer.json` file to include the new Tenant Namespace.

I.E.

```
    ...

    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "App\\Tenant\\": "Tenant/",
        },

    ...

```

Folder Structure
----------------

[](#folder-structure)

```
app
Tenant
├── database
│   ├── factories
│   ├── migrations
│   └── seeds
├── Http
│   ├── Controllers
│   │   └── Api
│   ├── Middleware
│   └── Requests
├── Model
├── Policies
├── resources
│   ├── js
│   ├── lang
│   ├── sass
│   └── views
│       └── layouts
└── routes

```

Available Commands
------------------

[](#available-commands)

These are duplicates of laravel's built in `make:` commands and will reproduce the same output but in the folders created by `tenant:init`.

```
      tenant:init       Initialize Folder Structure
      tenant:controller Create a new tenant controller class
      tenant:factory    Create a Tenant Factory
      tenant:middleware Create a Tenant Middleware
      tenant:migration  Create a Tenant Migration
      tenant:model      Create a Tenant Model
      tenant:policy     Create a Tenant Policy
      tenant:request    Create a Tenant Request
      tenant:seeder     Create a Tenant Seeder

```

### Exceptions

[](#exceptions)

1. `tenant:controller --api`

    This command will put the controller in the `Http\Controllers\Api` folder.
2. `tenant:model`

    This command will automatically add the `onTenant` trait to the model; to disable this functionality use `tenant:model --not`

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4cc1e81955caf76eb7a6f442aa5a7ab9f1dc84d0ca246b2eb4f5f44c4ff50add?d=identicon)[sniper7kills](/maintainers/sniper7kills)

### Embed Badge

![Health badge](/badges/sniper7kills-tenant-helper/health.svg)

```
[![Health](https://phpackages.com/badges/sniper7kills-tenant-helper/health.svg)](https://phpackages.com/packages/sniper7kills-tenant-helper)
```

###  Alternatives

[gilek/yii2-gtreetable

yii2-gtreetable is an extension of Yii 2 Framework, which is wrapper for bootstrap-gtreetable plug-in, on the other hand it provides functionality which allows to save the nodes states into database.

4111.8k](/packages/gilek-yii2-gtreetable)[ziplr/php-qr-code

PHP Qr Code Generator compatible with php 7.0

119.7k](/packages/ziplr-php-qr-code)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
