PHPackages                             jiinkim/laravel-deeper-sanitizer - 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. jiinkim/laravel-deeper-sanitizer

ActiveLibrary

jiinkim/laravel-deeper-sanitizer
================================

A http request santizer for Laravel that allows you to sanitizer any format of JSON objects in Laravel Request before controllers start to deal with it

00PHP

Since Feb 1Pushed 3y ago1 watchersCompare

[ Source](https://github.com/jiin-kim109/laravel-deep-sanitizer)[ Packagist](https://packagist.org/packages/jiinkim/laravel-deeper-sanitizer)[ RSS](/packages/jiinkim-laravel-deeper-sanitizer/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Deep Sanitizer
======================

[](#laravel-deep-sanitizer)

This repository is originated from `arondeparon/laravel-request-sanitizer`. I gave a little change for my own use. Extra sanitizer classes are to handle more JSON payload formats.

Please check the original repo ().

Sanitize a nested JSON object
-----------------------------

[](#sanitize-a-nested-json-object)

```
class StoreCustomerInformationRequest extends FormRequest
{
     use SanitizesInputs;

     protected $sanitizers = [
        'billing_address' => [
            NestedSanitizer::class => [
                'sanitizers' => [
                    'address1',
                    'address2',
                    'city',
                    'country' => [
                        Lowercase::class
                    ],
                    'province',
                    'zip' => [
                        Uppercase::class,
                        Trim::class
                    ],
                    'province_code' => [
                        Uppercase::class
                    ],
                    'country_code' => [
                        Uppercase::class
                    ],
                ]
            ]
        ],
     ];
}
```

Sanitize an array of JSON objects
---------------------------------

[](#sanitize-an-array-of-json-objects)

```
class StoreCustomerInformationRequest extends FormRequest
{
     use SanitizesInputs;

     protected $sanitizers = [
        'line_items' => [
            NestedArraySanitizer::class => [
                'currency' => [
                    Uppercase::class
                ],
                'quantity' => [
                    RemoveNonNumeric::class
                ],
                'price' => [
                    RemoveNonNumeric::class
                ],
                'shipping_fee' => [
                    RemoveNonNumeric::class
                ],
                'discount' => [
                    RemoveNonNumeric::class
                ],
                'taxes' => [
                    RemoveNonNumeric::class
                ],
            ]
        ],
     ];
}
```

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/24cf24159d3ecc7d1b2c5a8c07b6a23c998e5b63703b13747cfa930c3c61073c?d=identicon)[jiinkim](/maintainers/jiinkim)

---

Top Contributors

[![jiin-kim109](https://avatars.githubusercontent.com/u/57239105?v=4)](https://github.com/jiin-kim109 "jiin-kim109 (7 commits)")

---

Tags

laravelphprest-api

### Embed Badge

![Health badge](/badges/jiinkim-laravel-deeper-sanitizer/health.svg)

```
[![Health](https://phpackages.com/badges/jiinkim-laravel-deeper-sanitizer/health.svg)](https://phpackages.com/packages/jiinkim-laravel-deeper-sanitizer)
```

PHPackages © 2026

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