Laravel 4 XSS input filterer
8,975
18
4
Package Data
Maintainer Username: JasonMortonNZ
Maintainer Contact: yobrojas@gmail.com (JasonNZ)
Package Create Date: 2013-04-30
Package Last Update: 2018-09-09
Language: PHP
License: Unknown
Last Refreshed: 2024-11-22 15:00:59
Package Statistics
Total Downloads: 8,975
Monthly Downloads: 11
Daily Downloads: 0
Total Stars: 18
Total Watchers: 4
Total Forks: 4
Total Open Issues: 6

Jinput Laravel 4 Package

A Laravel 4 alternative to Input, allowing you to have XSS filter and sanitized user input.

Now compatible with PHP 5.3

Usage - Examples

Jinput::all() - Grabs all input that Input::all() would normally give you, but XSS filtered.

Jinput::get('email') - Grabs an email field, just like Input::get('email') would do, again XSS filtered.

Installation

  1. Add a new entry into the the require: {} array of the composer.json file in the root of your Laravel 4 project. It should look something like this:

"require": { "laravel/framework": "4.0.*", "jasonnz/jinput": "dev-master" },

  1. Add the following to the end of the 'providers' array in /app/config/app.php:

     'JasonNZ\Jinput\JinputServiceProvider'
    
  2. Add the following to the end of the 'aliases' array in /app/config/app.php:

     'Jinput' => 'JasonNZ\Jinput\Jinput'
    

How to Use

Simple! Instead of doing the usual Input::get('value'); do this instead: Jinput::get('value');

You can also call Jinput::all(); to get all form input;