Makes your FormRequest keys retrieved from $request->safe()
method by default to prevent retrieval of unvalidated input values.
The package requires PHP 8
or higher and Laravel 9
or higher.
Install the package using composer:
composer require michael-rubel/laravel-safe-request
Apply trait for your base Form Request in Laravel:
use RetrievesSafeInput;
Any value accessed by the magic method (like $request->key
) now will be retrieved from the $request->safe()
.
composer test
The MIT License (MIT). Please see License File for more information.