aporat / laravel-filter-var
Laravel package for filtering and sanitizing request variables
Fund package maintenance!
aporat
Requires
- php: ^8.2
- ext-json: *
- illuminate/support: ^10|^11
- illuminate/validation: ^10|^11
- nesbot/carbon: ^2.0|^3.0
Requires (Dev)
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2024-11-25 01:25:06 UTC
README
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.