{"repo":"elegantweb/sanitizer","free":true,"listed":false,"github":"https://github.com/elegantweb/sanitizer","clone":"git clone https://github.com/elegantweb/sanitizer.git","description":"Sanitization library for PHP and Laravel framework.","language":"PHP","stars":115,"topics":["php","laravel","sanitization","laravel-sanitizer"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"sanitizer Sanitization library for PHP and the Laravel framework. Installation Usage Will result in: Laravel In Laravel, you can use the Sanitizer through the Facade: You may also Sanitize input in your own FormRequests by using the SanitizesInput trait, and adding a filters method that returns the filters that you want applied to the input. Optional If you are planning to use sanitizer for all of your HTTP requests, you can optionally disable Laravel's TrimStrings and ConvertEmptyStringsToNull middleware from your HTTP kernel. Then, instead, you can use trim and empty string to null filters: Available Filters The following filters are available out of the box: Filter Description :------------------------- :------------------------- trim Trims the given string empty string to null If the given string is empty set it to null escape Removes HTML tags and encodes special characters of the given string lowercase Converts the given string to all lowercase uppercase Converts the given string to all uppercase capitalize Capitalizes the given string cast Casts the given value into the given type. Options are: integer, float, string, boolean, object, array and Laravel Collection. format date Always takes two arguments, the given date's format and the target format, following DateTime notation. strip tags Strips HTML and PHP tags from the given string digit Removes all characters except digits from the given string enum Casts the given value to its corresponding enum type Custom Filter","default_branch":null,"files":null,"tree":[],"storefront":"/r/elegantweb","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/elegantweb/sanitizer/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}