diff --git a/README.md b/README.md index ce5e1a9..8d67131 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,14 @@ You may also Sanitize input in your own FormRequests by using the SanitizesInput return [ 'name' => 'trim|capitalize', 'email' => 'trim', + 'text' => 'remove_strings:Curse,Words,Galore', + ]; + } + + public function customFilters() + { + return [ + 'remove_strings' => RemoveStringsFilter::class, ]; } diff --git a/composer.json b/composer.json index 01a0953..4d8f40e 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "waavi/sanitizer", - "description": "Data sanitizer and Laravel 5 form requests with input sanitation.", + "description": "Data sanitizer and Laravel 7 form requests with input sanitation.", "keywords": ["laravel", "sanitation", "input sanitation", "input sanitizer", "input", "transform input", "input filter"], "license": "MIT", "authors": [{ @@ -33,6 +33,9 @@ } } }, + "config": { + "sort-packages": true + }, "minimum-stability": "dev", "scripts": { "test": "vendor/bin/phpunit" diff --git a/src/Laravel/SanitizesInput.php b/src/Laravel/SanitizesInput.php index 2d1640e..615d6a2 100644 --- a/src/Laravel/SanitizesInput.php +++ b/src/Laravel/SanitizesInput.php @@ -58,7 +58,7 @@ public function addCustomFilters() /** * Filters to be applied to the input. * - * @return void + * @return array */ public function filters() { @@ -68,7 +68,7 @@ public function filters() /** * Custom Filters to be applied to the input. * - * @return void + * @return array */ public function customFilters() {