PHPackages                             naotty/laravel-pr-message - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. naotty/laravel-pr-message

ActiveLibrary[HTTP &amp; Networking](/categories/http)

naotty/laravel-pr-message
=========================

Laravel middleware to add PR message to API response headers

1.0.2(1y ago)32MITPHPPHP ^8.2

Since May 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/naotty/laravel-pr-message)[ Packagist](https://packagist.org/packages/naotty/laravel-pr-message)[ RSS](/packages/naotty-laravel-pr-message/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (5)Versions (5)Used By (0)

Laravel PR Message
==================

[](#laravel-pr-message)

Laravel middleware to add PR message to API response headers.
You can enter the message you want to convey to the user!

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

[](#installation)

Install using Composer:

```
composer require naotty/laravel-pr-message
```

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

[](#configuration)

### Publish the configuration file

[](#publish-the-configuration-file)

Run the following command to publish the configuration file:

```
php artisan vendor:publish --tag=pr-message-config
```

This will create the `config/pr-message.php` file.

### Customize the messages

[](#customize-the-messages)

Edit the `config/pr-message.php` file to customize the PR messages:

```
return [
    'messages' => [
        'Would you like to work with us? We are hiring engineers!',
        'This service makes you happy!',
        'Let\'s create better services together!',
        'This service makes your life better!',
        'You, who are reading this message, would you like to work with us?',
        // Add your own messages
    ],
];
```

Usage
-----

[](#usage)

### Response Headers

[](#response-headers)

When using this middleware, the following HTTP header will be added to your API responses:

- `pr-message`: A randomly selected message from your configured message list

### Register as a global middleware

[](#register-as-a-global-middleware)

Add the following to the `$middleware` array in the `app/Http/Kernel.php` file:

```
protected $middleware = [
    // Other middleware
    \Naotty\LaravelPrMessage\Middleware\AddPrMessageHeader::class,
];
```

### Apply to a specific route

[](#apply-to-a-specific-route)

Use the alias that is already registered in the `$routeMiddleware` array in the `app/Http/Kernel.php` file:

```
protected $routeMiddleware = [
    // Other middleware
    'pr-message' => \Naotty\LaravelPrMessage\Middleware\AddPrMessageHeader::class,
];
```

Then, use it in the route definition:

```
Route::get('/api/endpoint', function () {
    return response()->json(['data' => 'example']);
})->middleware('pr-message');
```

License
-------

[](#license)

MIT

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance48

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Total

3

Last Release

417d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3971418?v=4)[naotty](/maintainers/naotty)[@naotty](https://github.com/naotty)

---

Top Contributors

[![naotty](https://avatars.githubusercontent.com/u/3971418?v=4)](https://github.com/naotty "naotty (13 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/naotty-laravel-pr-message/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[api-platform/laravel

API Platform support for Laravel

58171.4k14](/packages/api-platform-laravel)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k90.5k1](/packages/mike-bronner-laravel-model-caching)[illuminate/auth

The Illuminate Auth package.

10528.2M1.2k](/packages/illuminate-auth)[illuminate/routing

The Illuminate Routing package.

1419.2M3.0k](/packages/illuminate-routing)

PHPackages © 2026

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