PHPackages                             mahdiaslami/laravel-nginx - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mahdiaslami/laravel-nginx

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mahdiaslami/laravel-nginx
=========================

Save nginx config to your repository and dynamically generate it.

v1.0.1(3y ago)03[1 issues](https://github.com/mahdiaslami/laravel-nginx/issues)MITPHPPHP ^8.0|^8.1

Since Sep 13Pushed 3y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (4)Used By (0)

Laravel Nginx
=============

[](#laravel-nginx)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e805f20d8ab703504168f5f5a77368ce8be7b705d363b0444dd042b4f25c1008/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6168646961736c616d692f6c61726176656c2d6e67696e782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mahdiaslami/laravel-nginx)[![Total Downloads](https://camo.githubusercontent.com/3fe7d4068c4cc7524ecf78ae6e927d19dd21979442a3b60696b9b571f740575d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6168646961736c616d692f6c61726176656c2d6e67696e782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mahdiaslami/laravel-nginx)[![GitHub Actions](https://github.com/mahdyaslami/laravel-nginx/actions/workflows/main.yml/badge.svg)](https://github.com/mahdyaslami/laravel-nginx/actions/workflows/main.yml/badge.svg)

This package prepares the commands for creating Nginx config from the Blade format.

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

[](#installation)

You can install the package via composer:

```
composer require mahdiaslami/laravel-nginx
```

Usage
-----

[](#usage)

Create `.nginx` directory and add `config.stub` file to it. this file contains the Nginx configuration for your application. if you use a variable inside it you should prepare it inside `.env` file with `NGINX_` prefix.

for example:

```
// .nginx/config.stub
server {
    root {{ $variable }};
}

```

```
// .env
NGINX_VARIABLE=/path/

```

You can use as many variables as you need. and use all blade directives. it will be rendered by the blade.

For publish your config into `/etc/nginx/sites-available/` directory use following command. and if you only want to see configuration after render use `--show` option

```
$ php artisan nginx:publish
```

To create a symbolic link in the `/etc/nginx/sites-enabled` directory use the following command.

```
$ php artisan nginx:link
```

Set the name of the file in the `sites-available` directory by evaluating the `NGINX_FILENAME` variable in the `.env` directory.

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

### Security

[](#security)

If you discover any security related issues, please email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Mahdi Aslami Khavari](https://github.com/mahdyaslami)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Total

2

Last Release

1388d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19308725?v=4)[Mahdi Aslami Khavari](/maintainers/mahdiaslami)[@mahdiaslami](https://github.com/mahdiaslami)

---

Top Contributors

[![mahdiaslami](https://avatars.githubusercontent.com/u/19308725?v=4)](https://github.com/mahdiaslami "mahdiaslami (2 commits)")

---

Tags

laravel-nginxmahdyaslamimahdiaslami

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M277](/packages/illuminate-pipeline)[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.2M208](/packages/illuminate-broadcasting)[illuminate/redis

The Illuminate Redis package.

8314.6M369](/packages/illuminate-redis)

PHPackages © 2026

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