michael-rubel/laravel-helpful-traits

This package is abandoned and no longer maintained. The author suggests using the https://github.com/michael-rubel/laravel-safe-request package instead.

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

1.0.1 2022-06-02 16:52 UTC

This package is auto-updated.

Last update: 2022-06-16 13:35:20 UTC


README

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.x and Laravel ^8.71 or ^9.0.

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