PHPackages                             inani/laravel-same-request - 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. [Database &amp; ORM](/categories/database)
4. /
5. inani/laravel-same-request

ActiveLibrary[Database &amp; ORM](/categories/database)

inani/laravel-same-request
==========================

The missing Laravel's request check on its unicity.

1.3.0(2y ago)10504MITPHP

Since Oct 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/akiyamaSM/laravel-same-request)[ Packagist](https://packagist.org/packages/inani/laravel-same-request)[ RSS](/packages/inani-laravel-same-request/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (3)Versions (10)Used By (0)

Motivation
----------

[](#motivation)

[![Total Downloads](https://camo.githubusercontent.com/5597fe93ce6ac8760fe3f96d84e05fe3fbc68a2085b30ec3f6a47967ff905ed0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e616e692f6c61726176656c2d73616d652d726571756573742e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/5597fe93ce6ac8760fe3f96d84e05fe3fbc68a2085b30ec3f6a47967ff905ed0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e616e692f6c61726176656c2d73616d652d726571756573742e7376673f7374796c653d666c61742d737175617265)

This laravel package will allow you to execute a code once in the current request based on the key provided.

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

[](#installation)

```
composer require inani/laravel-same-request

```

You will(for L5) need to register the service provider in the `config/app.php` .

```
return [
       /*
         * Package Service Providers...
         */

        /*
         * Application Service Providers...
         */
        App\Providers\AppServiceProvider::class,
        App\Providers\AuthServiceProvider::class,
        // App\Providers\BroadcastServiceProvider::class,
        App\Providers\EventServiceProvider::class,
        App\Providers\RouteServiceProvider::class,
        Inani\UniqueRequest\UniqueRequestServiceProvider::class, //  [
                'throttle:120,1',
                'bindings',
                PreventCache::class,
                GetJwtFromCookie::class,
                AddUniqueIdentifier::class
         ],
];
```

Usage
-----

[](#usage)

```
    for ($i= 0; $i < 2; $i++){
        $greeting = request()->once(function (){
            info('entred once');
            return 'hello';
        }, 'greeting');
    }

    $goodbye = request()->once(function (){
        return 'Saynoara';
    }, 'bye');

    $goodbye = request()->once(function (){
        return 'ByeBye';
    }, 'bye');

    return [$greeting, $goodbye];
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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 ~63 days

Recently: every ~94 days

Total

7

Last Release

938d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fbeb774293770efe72dfe486b323e999e6d65d0df0db9052a1e5b76d9711efe?d=identicon)[akiyamaSM](/maintainers/akiyamaSM)

---

Top Contributors

[![akiyamaSM](https://avatars.githubusercontent.com/u/12276076?v=4)](https://github.com/akiyamaSM "akiyamaSM (11 commits)")

---

Tags

cacheeloquentimprovementlaravelpackagesphpsqlstoragerequestphplaravelunique

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/inani-laravel-same-request/health.svg)

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

###  Alternatives

[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2031.2M2](/packages/glushkovds-phpclickhouse-laravel)[codezero/laravel-unique-translation

Check if a translated value in a JSON column is unique in the database.

186965.1k7](/packages/codezero-laravel-unique-translation)[io238/laravel-iso-countries

Ready-to-use Laravel models and relations for country (ISO 3166), language (ISO 639-1), and currency (ISO 4217) information with multi-language support.

5462.3k](/packages/io238-laravel-iso-countries)[sebastiaanluca/laravel-boolean-dates

Automatically convert Eloquent model boolean attributes to dates (and back).

40111.7k1](/packages/sebastiaanluca-laravel-boolean-dates)[inani/larapoll

A Laravel package to create polls

25517.7k1](/packages/inani-larapoll)

PHPackages © 2026

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