Package Data | |
---|---|
Maintainer Username: | elmhurst |
Maintainer Contact: | samjoyce777@gmail.com (Sam Joyce) |
Package Create Date: | 2016-02-07 |
Package Last Update: | 2016-02-07 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-17 03:02:11 |
Package Statistics | |
---|---|
Total Downloads: | 5 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 2 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Scans through a users input and checks for unwanted words, phrases, links, and emails. If the list of words you have are long I would recommend having the response back to the user, queue the post screening for later and publish once scanned.
$ composer install samjoyce777/laravel-post-screen --save
Add the service provider to the config.php
$ \samjoyce777\LaravelPostScreen\ScreenServiceProvider::class,
Add the facade as well to make it all pretty
$ 'Map' => \samjoyce777\LaravelPostScreen\Facades\Screen::class,
Move the config file to make your customizations
$ php artisan vendor:publish --tag=config
This will check to see if an email is in the text
Screen::hasEmail($post);
This will check to see if text has an external link
Screen::hasExternalLink($post);
This run through your configuration to see if the text passes all methods required.
Screen::isClean($post);
You can also set different levels of screening depending on requirements by setting more levels in the config file and passing level name on the second argument.
Screen::isClean($post, 'review');