定制 jasonnz/jinput 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jasonnz/jinput

Composer 安装命令:

composer require jasonnz/jinput

包简介

Laravel 4 XSS input filterer

README 文档

README

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;

统计信息

  • 总下载量: 9.06k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 19
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 18
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2013-04-30