PHPackages                             moeen/photon-lumen - 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. moeen/photon-lumen

ActiveLibrary[Framework](/categories/framework)

moeen/photon-lumen
==================

Lumen Extension for SRP (Single Responsibility Principle)

v0.1(4y ago)010MITPHPPHP ^8.0

Since Sep 20Pushed 4y ago1 watchersCompare

[ Source](https://github.com/moeen-basra/photon-lumen)[ Packagist](https://packagist.org/packages/moeen/photon-lumen)[ RSS](/packages/moeen-photon-lumen/feed)WikiDiscussions main Synced 1mo ago

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

Photon
======

[](#photon)

An Extension for the Lumen for SRP (Single Responsibility Principle).

### How to use

[](#how-to-use)

1. install the package using the following command

```
composer require moeen-basra/photon-lumen
```

2. Open the file `bootstrap/app.php` and register `Photon\Foundation\Providers\HttpServiceProvider`

```
$app->register(Photon\Foundation\Providers\HttpServiceProvider::class);

```

3. Open the file `app/Http/Controllers/Controller.php` and replace the following code

`use Laravel\Lumen\Routing\Controller as BaseController;`

with this

`use Photon\Foundation\Controller as BaseController;`

4. Open the file `app\Exceptions\Handler` extend it from `\Photon\Foundation\Exceptions\Handler\Handler`
5. Now you have to can create the following directories in the `app` folder.

```
|-- app
|  |-- Domains
|  |-- Features
|  |-- Operations

```

Great now you are good to go.

Here is a sample code for a controller serving the feature.

```
namespace App\Http\Controllers\Api\Auth;

use Illuminate\Http\JsonResponse;
use Photon\Foundation\Controller;
use App\Features\Api\Auth\RegisterFeature;

class AuthController extends Controller
{

    public function __construct()
    {
        $this->middleware('auth:api', ['only' => 'me', 'logout', 'refresh']);
    }

    /**
     * Register user
     *
     * @return JsonResponse
     */
    public function register(): JsonResponse
    {
        return $this->serve(RegisterFeature::class);
    }
}
```

Here is sample code for Feature running the jobs and operations

```
namespace App\Features\Api\Auth;

use Photon\Foundation\Feature;
use App\Operations\Auth\RegisterOperation;
use Photon\Domains\Http\Jobs\JsonResponseJob;
use App\Domains\Auth\Jobs\Register\ValidateRegisterRequestJob;

class RegisterFeature extends Feature
{
    public function handle()
    {
        $input = $this->run(ValidateRegisterRequestJob::class);

        $data = $this->run(RegisterOperation::class, compact('input'));

        return $this->run(new JsonResponseJob($data));
    }
}
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Unknown

Total

1

Last Release

1699d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/29e85434bbb62af31bbfe18c0983fd39f14e472995e53ecfab734258fd470b9b?d=identicon)[moeen-basra](/maintainers/moeen-basra)

---

Top Contributors

[![moeen-basra](https://avatars.githubusercontent.com/u/3841052?v=4)](https://github.com/moeen-basra "moeen-basra (24 commits)")

---

Tags

laravellumenphotonlaravel lumen

### Embed Badge

![Health badge](/badges/moeen-photon-lumen/health.svg)

```
[![Health](https://phpackages.com/badges/moeen-photon-lumen/health.svg)](https://phpackages.com/packages/moeen-photon-lumen)
```

###  Alternatives

[saad/api-debugger

Easily debug your JSON API.

1170.1k](/packages/saad-api-debugger)[lushdigital/microservice-core

A set of core functionality and convenience classes for a Lumen microservice.

105.5k](/packages/lushdigital-microservice-core)

PHPackages © 2026

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