PHPackages                             azaharizaman/nexus-laravel-tenant-adapter - 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. [Framework](/categories/framework)
4. /
5. azaharizaman/nexus-laravel-tenant-adapter

ActiveLibrary[Framework](/categories/framework)

azaharizaman/nexus-laravel-tenant-adapter
=========================================

Laravel adapter for Tenant package with multi-tenant support

v0.1.0-alpha1(2mo ago)02MITPHPPHP ^8.3

Since May 5Pushed 2mo agoCompare

[ Source](https://github.com/azaharizaman/nexus-laravel-tenant-adapter)[ Packagist](https://packagist.org/packages/azaharizaman/nexus-laravel-tenant-adapter)[ RSS](/packages/azaharizaman-nexus-laravel-tenant-adapter/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

Nexus Laravel Tenant Adapter
============================

[](#nexus-laravel-tenant-adapter)

This adapter provides Laravel-specific implementations for the Tenant package, enabling multi-tenant support in Laravel applications.

Purpose
-------

[](#purpose)

The Tenant package is an atomic package that must remain independently publishable. This adapter layer provides the concrete implementations that integrate Tenant with the Laravel framework:

- **Database tenant resolution** - Uses Laravel's database layer
- **Cache integration** - Uses Laravel's cache system
- **Event dispatcher** - Uses Laravel's event system

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

[](#installation)

```
composer require azaharizaman/nexus-laravel-tenant-adapter
```

Adapters Provided
-----------------

[](#adapters-provided)

### TenantContextAdapter

[](#tenantcontextadapter)

Implements `Nexus\Tenant\Contracts\TenantContextInterface` by resolving the current tenant from Laravel's application context (request, auth, or cache).

### TenantPersistenceAdapter

[](#tenantpersistenceadapter)

Implements `Nexus\Tenant\Contracts\TenantPersistenceInterface` by delegating to Laravel's Eloquent ORM for database operations.

### TenantQueryAdapter

[](#tenantqueryadapter)

Implements `Nexus\Tenant\Contracts\TenantQueryInterface` by using Laravel's query builder for tenant lookups.

### CacheRepositoryAdapter

[](#cacherepositoryadapter)

Implements `Nexus\Tenant\Contracts\CacheRepositoryInterface` by using Laravel's cache system.

### EventDispatcherAdapter

[](#eventdispatcheradapter)

Implements `Nexus\Tenant\Contracts\EventDispatcherInterface` by using Laravel's event dispatcher.

### ImpersonationStorageAdapter

[](#impersonationstorageadapter)

Implements `Nexus\Tenant\Contracts\ImpersonationStorageInterface` by using Laravel's session/cache for storing impersonation tokens.

Service Provider
----------------

[](#service-provider)

The `TenantAdapterServiceProvider` automatically binds the Tenant interfaces to their adapter implementations when the Laravel application boots.

Architecture
------------

[](#architecture)

This follows the Nexus Three-Layer Architecture:

1. **Atomic Layer** (`packages/Tenant`) - Pure business logic, no external dependencies
2. **Adapter Layer** (`adapters/Laravel/Tenant`) - Framework-specific implementations
3. **Application Layer** - Uses adapters through interfaces

Dependencies
------------

[](#dependencies)

- `azaharizaman/nexus-tenant` - The atomic Tenant package
- `illuminate/support` - Laravel framework components
- `illuminate/database` - Laravel database components
- `psr/log` - PSR-3 logging interface

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance84

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

81d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/117408?v=4)[Azahari Zaman](/maintainers/azaharizaman)[@azaharizaman](https://github.com/azaharizaman)

---

Top Contributors

[![azaharizaman](https://avatars.githubusercontent.com/u/117408?v=4)](https://github.com/azaharizaman "azaharizaman (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/azaharizaman-nexus-laravel-tenant-adapter/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M246](/packages/laravel-ai)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k21](/packages/fleetbase-core-api)

PHPackages © 2026

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