PHPackages                             flametrench/laravel - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. flametrench/laravel

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

flametrench/laravel
===================

Laravel adapter for Flametrench: ServiceProvider + facades + middleware bridging the flametrench/{ids,identity,tenancy,authz} PHP SDKs into Laravel applications.

v0.3.0(1mo ago)011Apache-2.0PHPPHP ^8.3

Since May 1Pushed 1mo agoCompare

[ Source](https://github.com/flametrench/laravel)[ Packagist](https://packagist.org/packages/flametrench/laravel)[ Docs](https://flametrench.dev)[ RSS](/packages/flametrench-laravel/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (18)Versions (4)Used By (0)

Flametrench Laravel SDK
=======================

[](#flametrench-laravel-sdk)

Laravel adapter for [Flametrench](https://github.com/flametrench/spec) — wires the four PHP SDK packages (`flametrench/{ids,identity,tenancy,authz}`) into Laravel's service container.

Status
------

[](#status)

Pre-release scaffold. Targets Laravel 11+ on PHP 8.3+. Spec tracking [v0.2.0](https://github.com/flametrench/spec/releases).

Install
-------

[](#install)

```
composer require flametrench/laravel:^0.2.0
```

The package auto-registers `Flametrench\Laravel\FlametrenchServiceProvider` and the `Flametrench` facade alias via Laravel's package discovery.

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

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=flametrench-config
```

This drops `config/flametrench.php` into your app, where you select drivers per capability:

```
return [
    'identity' => ['driver' => env('FLAMETRENCH_IDENTITY_DRIVER', 'in-memory')],
    'tenancy'  => ['driver' => env('FLAMETRENCH_TENANCY_DRIVER',  'in-memory')],
    'authz'    => ['driver' => env('FLAMETRENCH_AUTHZ_DRIVER',    'in-memory')],
];
```

The default `in-memory` driver wires the reference implementations from the per-capability SDKs — fine for tests and local development.

Production binding
------------------

[](#production-binding)

This package does not ship Postgres-backed stores; those live in the per-capability SDKs as they land. For production, override the bindings in your own `AppServiceProvider::register()`:

```
use Flametrench\Identity\IdentityStore;
use App\Identity\PostgresIdentityStore;

public function register(): void
{
    $this->app->singleton(IdentityStore::class, function ($app) {
        return new PostgresIdentityStore($app->make(\PDO::class));
    });
}
```

`AppServiceProvider` runs before package providers, so your binding wins.

Usage
-----

[](#usage)

Type-hint the Flametrench store interfaces in controller / job constructors:

```
use Flametrench\Tenancy\TenancyStore;

class OrgController
{
    public function __construct(private readonly TenancyStore $tenancy) {}

    public function store(Request $request): JsonResponse
    {
        $result = $this->tenancy->createOrg(
            $request->user()->id,
            name: $request->input('name'),
            slug: $request->input('slug'),
        );
        return response()->json($result['org']);
    }
}
```

Or use the `Flametrench` facade for one-liners:

```
use Flametrench\Laravel\Facades\Flametrench;

$user = Flametrench::identity()->getUser($usrId);
```

Testing
-------

[](#testing)

```
composer install
composer test
composer test:coverage
```

The test suite uses [Orchestra Testbench](https://github.com/orchestral/testbench) to boot a Laravel application around the package, so the service provider binds against a real container.

License
-------

[](#license)

Apache License 2.0. Copyright 2026 NDC Digital, LLC.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance90

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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

Every ~35 days

Total

2

Last Release

49d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19826928?v=4)[Nathan Call](/maintainers/nathancall)[@nathancall](https://github.com/nathancall)

---

Top Contributors

[![nathancall](https://avatars.githubusercontent.com/u/19826928?v=4)](https://github.com/nathancall "nathancall (6 commits)")

---

Tags

laravelidentityauthorizationmulti-tenancytenancyflametrench

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

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

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M321](/packages/laravel-horizon)[illuminate/database

The Illuminate Database package.

2.8k54.9M12.2k](/packages/illuminate-database)[laravel/ai

The official AI SDK for Laravel.

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

Laravel administration panel

1.3k253.1k86](/packages/moonshine-moonshine)[illuminate/auth

The Illuminate Auth package.

10528.2M1.3k](/packages/illuminate-auth)

PHPackages © 2026

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