Download the PHP package sworup/profanityfilter without Composer
On this page you can find all versions of the php package sworup/profanityfilter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sworup/profanityfilter
More information about sworup/profanityfilter
Files in sworup/profanityfilter
Package profanityfilter
Short Description Profanity filter package would help you censor some of the bad words users put in your posts and/or comments.
License MIT
Homepage https://github.com/Sworup/ProfanityFilter
Informations about the package profanityfilter
Profanity Filter
Profanity Filter takes strings as input and removes any bad curse words that the string might have. It checks the strings for specific blacklist which must match as a separate word to be considered as a curse word. If a curse word is found, then it will replace the curse word with a censor character the user chooses (default is *).
This package is intended to used with Laravel. Tested and working with laravel 5.4.
If you want to override the Package's config file, just copy it and rename it to , and update as per your needs.
This code is based on Fastwebmedia/Profanity-Filter. A major part of it is taken from there and I added the things that I thought it required.
Install
Via Composer
Laravel
Add to your providers array.
If you wish to use the Facade then add
The package will automatically use the config file containing the list of banned words.
Usage
The above code would return:
Change log
Please see CHANGELOG for more information about what has changed recently.
Testing
Contributing
Please see CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Sworup Shakya
- All Contributors
License
The MIT License (MIT). Please see License File for more information.