michael-rubel/laravel-safe-request

This package is abandoned and no longer maintained. No replacement package was suggested.

Makes your FormRequest keys retrieved from `$request->safe()` method by default to prevent retrieval of unvalidated input values.

2.0.1 2023-01-19 11:48 UTC

README

Safe input by default

Laravel Safe Request

Latest Version on Packagist Total Downloads Code Quality Code Coverage GitHub Tests Action Status PHPStan

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.

#StandWithUkraine

SWUbanner

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 by 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.