The intelligent PHP middleware that detects and blocks masked Indonesian spam patterns, so you don't have to.
Unlike basic string replacement, our engine generates thousands of permutations for every keyword. It understands that s10t, s.l.o.t, and sl0t are the same word.
Tuned specifically for the Indonesian market. Pre-loaded with local gambling terms, hate speech, and slang.
Includes a Facade and Service Provider. Just install and use `ContentGuard::check()`.
Keeps your vendor folder clean and your app fast.
Whether you are building a Laravel monolith or a native PHP script, ContentGuard fits right in. No complex configuration files or external API calls required.
Returns boolean for easy if/else checks.
Customize blocklists via array config.
use Heyitsmi\ContentGuard\Facades\ContentGuard;
public function store(Request $request)
{
$input = $request->input('comment');
// 1. Check for spam content
if (ContentGuard::hasBadWords($input)) {
return back()->withErrors([
'msg' => 'Restricted content detected!'
]);
}
// 2. Or sanitize the string directly
$clean = ContentGuard::sanitize($input);
$post->saveComment($clean);
}
Type typical Indonesian spam below to test the filter.
Common questions about performance and compatibility.