PHPackages                             rcerljenko/laravel-openai-moderation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rcerljenko/laravel-openai-moderation

ActiveLibrary[API Development](/categories/api)

rcerljenko/laravel-openai-moderation
====================================

Laravel package for OpenAI Moderation API

1.1.0(3y ago)251.3k2MITPHPPHP ^8.1

Since Feb 10Pushed 3y ago2 watchersCompare

[ Source](https://github.com/rcerljenko/laravel-openai-moderation)[ Packagist](https://packagist.org/packages/rcerljenko/laravel-openai-moderation)[ Docs](https://github.com/rcerljenko/laravel-openai-moderation)[ RSS](/packages/rcerljenko-laravel-openai-moderation/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Laravel OpenAI Moderation Rule
==============================

[](#laravel-openai-moderation-rule)

Laravel validation Rule using [OpenAI Moderation API](https://platform.openai.com/docs/guides/moderation). Gives you a way to validate your form requests for inappropriate content.

Installation
------------

[](#installation)

Standard [Composer](https://getcomposer.org/download) package installation:

```
composer require rcerljenko/laravel-openai-moderation
```

Usage
-----

[](#usage)

1. Publish config and translation files.

```
php artisan vendor:publish --provider="RCerljenko\LaravelOpenAIModeration\ServiceProvider"
```

2. Set your OpenAI API key and enable package via newly created config file =&gt; `config/openai.php`
3. Use provided rule with your validation rules.

```
