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

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

steelants/laravel-tenant
========================

Everything you need to start your Laravel journey.

2.2.6(1mo ago)1979↓33.3%MITPHP

Since Feb 8Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/steelants/Laravel-Tenant)[ Packagist](https://packagist.org/packages/steelants/laravel-tenant)[ RSS](/packages/steelants-laravel-tenant/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (25)Used By (0)

Laravel-Tenant
==============

[](#laravel-tenant)

Currently WIP
-------------

[](#currently-wip)

### Created by: [SteelAnts s.r.o.](https://www.steelants.cz/)

[](#created-by-steelants-sro)

[![Total Downloads](https://camo.githubusercontent.com/11221268b665bd452d2f78f63bccc7082c53102ff8e35727239333e3368487b9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f737465656c616e74732f666f726d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/steelants/laravel-tenant)

### Install

[](#install)

```
php artisan vendor:publish --tag=tenant-migrations
php artisan migrate

```

If your tenants have thier own SMTP settings, add following into `mailers` array in `config/mail.php`

```
'smtp_tenant' => [
    'transport' => 'smtp',
    'host' => '',
    'port' => env('MAIL_PORT', 587),
    'encryption' => env('MAIL_ENCRYPTION', 'tls'),
    'username' => '',
    'password' => '',
    'timeout' => null,
    'auth_mode' => null,
],

```

### Usage

[](#usage)

```
// Access tenant manager
tenantManager()

// Access current tenant object
tenant()

// is helper wrapper function for
app(TenantManager::class)->getTenant();
```

### Sending emails

[](#sending-emails)

```
// sending emial from tenants own SMTP server
tenantManager()->mailer()->to(...)->send(...);

// for sending emails from app's SMTP server use Laravel's default Mail class
Mail::to(...)->send(...);
```

### Running in console

[](#running-in-console)

By default, on web, tenant is set in `TenantServiceProvider` by subdomain. To use `tenant()` or `tenantManager()->mailer()` in console, for example in jobs, cron, ... you need to manualy set current tenant.

```
// Find your tenant
$tenant = Tenant::find($tenantId);

// Set as current tenant
tenantManager()->set($tenant);
```

Development
-----------

[](#development)

### Creation of symlinks for dev environment:

[](#creation-of-symlinks-for-dev-environment)

```
ln -s ./package/boilerplate/stubs/resources/ resources
```

Contributors
------------

[](#contributors)

[ ![](https://camo.githubusercontent.com/b530c63639ee895a0987f6ddca3d0b36e654af21a3f4e3165e7f8c0faf574866/68747470733a2f2f636f6e747269622e726f636b732f696d6167653f7265706f3d737465656c616e74732f4c61726176656c2d426f696c6572706c617465)](https://github.com/steelants/Laravel-Boilerplate/graphs/contributors)Other Packages
--------------

[](#other-packages)

[steelants/datatable](https://github.com/steelants/Livewire-DataTable)

[steelants/form](https://github.com/steelants/Laravel-Form)

[steelants/modal](https://github.com/steelants/Livewire-Modal)

Notes
-----

[](#notes)

- [Laravel MFA](https://dev.to/roxie/how-to-add-google-s-two-factor-authentication-to-a-laravel-8-application-4jjp)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance89

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 67.1% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~35 days

Recently: every ~42 days

Total

23

Last Release

56d ago

Major Versions

0.0.1 → 1.0.02024-03-26

1.0.1 → 2.0.02024-03-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/3dc98a78c37f6eea8dc7942cdace8a805ba6430a020e6ab54c62a0639fe51f38?d=identicon)[JonatanRek](/maintainers/JonatanRek)

---

Top Contributors

[![GamerClassN7](https://avatars.githubusercontent.com/u/22167469?v=4)](https://github.com/GamerClassN7 "GamerClassN7 (55 commits)")[![Xinatorus](https://avatars.githubusercontent.com/u/17276754?v=4)](https://github.com/Xinatorus "Xinatorus (21 commits)")[![Imendin](https://avatars.githubusercontent.com/u/3099109?v=4)](https://github.com/Imendin "Imendin (6 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/steelants-laravel-tenant/health.svg)

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

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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