aporat/laravel-filter-var

Laravel package for filtering and sanitizing request variables

v2.0.0 2024-11-25 01:03 UTC

This package is auto-updated.

Last update: 2024-11-25 01:25:06 UTC


README

codecov StyleCI Latest Version Latest Dev Version Monthly Downloads

Laravel package for filtering and sanitizing request variables

Installation

The filter-var service provider can be installed via Composer.

composer require aporat/laravel-filter-var

To use the FilterVar service provider, you must register the provider when bootstrapping your application.

Usage

Filter and escape user agent header:

$user_agent = FilterVar::filterValue('cast:string|trim|strip_tags|escape', $request->header('User-Agent'));

License]()

The MIT License (MIT). Please see License File for more information.