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 10mo 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 1mo ago

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 68% of packages

Maintenance52

Moderate activity, may be stable

Popularity6

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

Total

3

Last Release

365d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/969240943cf8ad440ec03b8b1eea2c6ed6aad6e25120fe94b0714e1807a6b274?d=identicon)[naotty](/maintainers/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

[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[tomschlick/laravel-http2-server-push

A middleware package for Laravel to enable server push for your script, style, and image assets.

16467.2k](/packages/tomschlick-laravel-http2-server-push)[onlime/laravel-http-client-global-logger

A global logger for the Laravel HTTP Client

1935.1k](/packages/onlime-laravel-http-client-global-logger)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[laragear/json

Easily retrieve and manipulate `Json` across your application.

363.5k](/packages/laragear-json)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)

PHPackages © 2026

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