michael-rubel / laravel-helpful-traits
Makes your FormRequest keys retrieved from `$request->safe()` method by default to prevent retrieval of unvalidated input values.
Fund package maintenance!
paypal.me/observername
Requires
- php: ^8.0|^8.1
- illuminate/http: ^8.71|^9.0
- spatie/laravel-package-tools: ^1.11
Requires (Dev)
- brianium/paratest: ^6.3
- mockery/mockery: ^1.4.4
- nunomaduro/collision: ^5.10|^6.0
- nunomaduro/larastan: ^1.0
- orchestra/testbench: ^6.6|^7.0
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
README
Makes your FormRequest keys retrieved from $request->safe()
method by default to prevent retrieval of unvalidated input values.
The package requires PHP ^8.x
and Laravel ^8.71
or ^9.0
.
#StandWithUkraine
Installation
Install the package using composer:
composer require michael-rubel/laravel-safe-request
Usage
Apply trait for your base Form Request in Laravel:
use RetrievesSafeInput;
Any value accessed be the magic method (like $request->key
) now will be retrieved from the $request->safe()
.
Testing
composer test
License
The MIT License (MIT). Please see License File for more information.