Download the PHP package gowelle/google-moderator without Composer

On this page you can find all versions of the php package gowelle/google-moderator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package google-moderator

Google Moderator

Latest Version on Packagist Total Downloads PHP Version Tests

A Laravel package for text and image moderation using Google AI APIs, with opt-in blocklists, multi-language support, and internal engine switching.

Table of Contents

Features

Requirements

Installation

Publish the configuration:

Publish the migrations:

Configuration

Authentication

The package supports multiple authentication methods:

Engine Selection

Quick Start

Text Moderation

Image Moderation

Validation Rules

The package provides custom Laravel validation rules for easy integration into your requests and validators.

ModeratedText

Validates that a string is safe according to your configured text engines and blocklists.

ModeratedImage

Validates pictures (uploads, paths, or URLs) against image moderation engines.

ModerationResult API

Blocklists

๐Ÿ’ก Bonus Feature: Google APIs don't provide customizable term blocking. This package includes a complete blocklist system so you can catch domain-specific terms, slang, or phrases that the AI might miss.

Why Blocklists?

Enabling Blocklists

File-Based Blocklists

Create JSON files in storage/blocklists/:

Publish sample files:

Database Blocklists

Store terms in the database for easy management via admin panels.

[!NOTE] Architecture Note: This package uses DB::table('blocklist_terms') directly for performance and does not include an Eloquent model. You can interact with the table using the DB facade or the provided Blocklist repository methods.

Ensure you have run the migrations:

Table schema structure:

Import/export via Artisan:

Pattern Matching

Blocklist terms support three matching modes:

Pattern Example Matches
Exact badword "This is badword here" โœ… "badwordy" โŒ
Wildcard *offensive* "very offensive content" โœ…
Regex /\b(bad\|terrible)\b/i "This is bad" โœ…

Engine Comparison

Feature Natural Language Vision Gemini
Text Moderation โœ… โŒ โœ…
Image Moderation โŒ โœ… โœ…
Toxicity Detection โœ… (16 categories) โŒ โœ…
SafeSearch โŒ โœ… โœ…
Multi-language โœ… N/A โœ…
Cost Per request Per image Per request
Default โœ… Text โœ… Image โŒ Optional

Thresholds

Configure sensitivity per category:

Events

The package dispatches a ContentFlagged event whenever content is flagged as unsafe:

ContentFlagged Event Properties

Disabling Events

Testing

Mocking in Tests

Changelog

Please see CHANGELOG for recent changes.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover a security vulnerability, please send an email to [email protected].

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of google-moderator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
spatie/laravel-package-tools Version ^1.93
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
google/cloud-language Version ^1.1
google/cloud-vision Version ^2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gowelle/google-moderator contains the following files

Loading the files please wait ...