maritho / badword
package filter badwords filter
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/maritho/badword
This package is auto-updated.
Last update: 2025-12-12 10:29:23 UTC
README
Requirements
Installation
composer require maritho/badword
Configure
so you either you have to add the service provider:
'providers' => [
...,
\Maritho\Badword\BadwordServiceProvider::class,
]
Publish and Migrate
-
php artisan vendor:publish --provider="Maritho\Badword\BadwordServiceProvider" -
php artisan migrate -
php artisan db:seed --class="Maritho\Badword\Database\Seeds\BadwordTableSeeder"
Usage
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Maritho\Badword\Badword;
class OrderController extends Controller
{
public function test(Request $request)
{
$data = 'Kamu adalah xxx dan xrated';
// optional extract badword result true or false
return Badword::check($data, true);
}
}