PHPackages                             umangunagar/laravel-code-formatter - 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. umangunagar/laravel-code-formatter

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

umangunagar/laravel-code-formatter
==================================

A simple package to format PHP &amp; Blade files in a Laravel project using Prettier

v1.0.0(1y ago)07MITPHPPHP ^8.0

Since Mar 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/umangunagar2003/laravel-code-formatter)[ Packagist](https://packagist.org/packages/umangunagar/laravel-code-formatter)[ RSS](/packages/umangunagar-laravel-code-formatter/feed)WikiDiscussions main Synced 1mo ago

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

**Laravel Code Formatter**
==========================

[](#laravel-code-formatter)

A Laravel package for formatting Blade, Controller, and Model files using a custom JSON-based formatting configuration.

---

**📌 Installation**
------------------

[](#-installation)

You can install the package via Composer:

```
composer require umangunagar/laravel-code-formatter
```

### **Install Dependencies**

[](#install-dependencies)

After installing the package, run the following command to install the required dependencies:

```
php artisan install:configuration
```

This package includes a default formatting configuration file (`formatter.json`). If you want to customize it, publish the configuration manually:

```
php artisan vendor:publish --tag=formatter-config
```

This will create a `formatter.json` file in your project's root directory, allowing you to define custom formatting rules.

---

**⚡ Usage**
-----------

[](#-usage)

This package provides Artisan commands to format specific Laravel files efficiently.

### **📂 Format Controllers**

[](#-format-controllers)

To format all controller files inside `app/Http/Controllers`:

```
php artisan format:controllers
```

To format a specific controller:

```
php artisan format:controllers ExampleController.php
```

To format all controllers inside a subdirectory:

```
php artisan format:controllers Example
```

---

### **📂 Format Models**

[](#-format-models)

To format all model files inside `app/Models`:

```
php artisan format:models
```

To format a specific model:

```
php artisan format:models Example.php
```

To format all models inside a subdirectory:

```
php artisan format:models Example
```

---

### **📂 Format Blade Files**

[](#-format-blade-files)

To format all Blade files inside `resources/views`:

```
php artisan format:blades
```

To format a specific Blade file:

```
php artisan format:blades example.blade.php
```

To format all Blade files inside a subdirectory:

```
php artisan format:blades Example
```

---

**💡 Why Use This Package?**
---------------------------

[](#-why-use-this-package)

✔ **Custom Formatting Rules:** This package allows you to define your own formatting rules in `formatter.json`.
✔ **Targeted Formatting:** Easily format specific directories, files, or subdirectories without manually specifying paths.
✔ **Laravel-Friendly:** Provides structured Artisan commands for seamless integration into Laravel projects.

---

**🛠 Troubleshooting**
---------------------

[](#-troubleshooting)

If you encounter any issues, try the following:

- Ensure the package is installed correctly:

    ```
    composer require umangunagar/laravel-code-formatter
    ```
- If formatting commands are not recognized, clear the autoload cache:

    ```
    composer dump-autoload
    ```
- Ensure you have published the configuration if needed:

    ```
    php artisan vendor:publish --tag=formatter-config
    ```

---

**📜 License**
-------------

[](#-license)

This package is open-source and available under the MIT License.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance46

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

407d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cf421f8fd4e48c64840f1c4c5822b5ca094e905bebda3f2e07db5ef7457ebedd?d=identicon)[umangunagar2003](/maintainers/umangunagar2003)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/umangunagar-laravel-code-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/umangunagar-laravel-code-formatter/health.svg)](https://phpackages.com/packages/umangunagar-laravel-code-formatter)
```

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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