PHPackages                             creativitykills/sanity - 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. creativitykills/sanity

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

creativitykills/sanity
======================

Array Sanitizers Package.

1.0.0(11y ago)112MITPHPPHP &gt;=5.4.0

Since Mar 10Pushed 11y ago1 watchersCompare

[ Source](https://github.com/neoighodaro/Sanity)[ Packagist](https://packagist.org/packages/creativitykills/sanity)[ RSS](/packages/creativitykills-sanity/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

PHP Array Sanitizer
===================

[](#php-array-sanitizer)

[![Build Status](https://camo.githubusercontent.com/1073fa4747eb1e170eed015f39a56ef109fbcb5b8e649289e5a2efcc203344ff/68747470733a2f2f7472617669732d63692e6f72672f437265617469766974794b696c6c732f53616e6974792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/CreativityKills/Sanity)

This package is a Sanitizer for PHP arrays. It's best used to sanitize request inputs like input from `$_POST` and/or `$_GET`.

Usage
-----

[](#usage)

### Step 1: Install via Composer

[](#step-1-install-via-composer)

```
composer require 'creativitykills/sanity'

```

### Step 2: Add the Service Provider

[](#step-2-add-the-service-provider)

Open `config/app.php` and, to your "providers" array at the bottom, add:

```
"CreativityKills\Sanity\SanityServiceProvider"

```

### Sanitize Requests

[](#sanitize-requests)

Out of the box you can start running requests through the sanitizer.

```
