Often when receiving data from a client in an API or from a form request, you'll find yourself running the same data
cleaning operations such as transforming 'false' to the boolean false, converting '' to null etc. This can be a pain.
This package simplifies the process drastically.
Install the package with composer :
composer require acid-solutions/input-sanitizer
Laravel 5.5+ uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider and the Facade alias.
If you don't use auto-discovery or if you use a Laravel 5.4- version, add the package service provider in the register() method from your app/Providers/AppServiceProvider.php :