Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Ali Green

Laravel Ali Green Laravel Package

james.xue/laravel-ali-green

A Laravel wrapper for Alibaba Cloud Green (Ali Green) adding automated content moderation. Scan text, images, and media for risky or prohibited content through a clean API with facade support, so compliance checks on user-generated content are simple without touching the raw SDK.

View on GitHub
Deep Wiki
Context7

laravel 阿里鉴黄包括文本、图片、视频,关键词文本检测以及对图片涉黄、暴恐、敏感检测、广告、二维码视频色情、暴恐涉政视频等

Frequently asked questions about Laravel Ali Green
How do I install james.xue/laravel-ali-green in a Laravel application?
Install it with Composer using composer require james.xue/laravel-ali-green, then publish the package configuration and add your Alibaba Cloud credentials to the environment file. Because the last release was July 2023, check the composer.json constraints for illuminate/* and PHP before installing on newer Laravel versions. On Laravel 11 or 12 you may need to widen constraints in a fork or vendor the code.
What credentials and configuration does laravel-ali-green require?
You need an Alibaba Cloud AccessKey ID and AccessKey Secret, ideally from a RAM sub-account scoped only to the Green content-moderation service. The package provides a publishable config file where you set credentials and endpoint or region options, and the README expects these values in .env. Account provisioning, real-name verification, and region selection happen in the Aliyun console and are usually the biggest setup effort.
Which content types can this Laravel package moderate?
It wraps Alibaba Cloud Green to scan text for anti-spam and keyword violations, images for pornography, terrorism, ads, and QR codes, and video for pornography and political-violence categories. All detection runs server-side at Aliyun; the package is only an ergonomic Laravel adapter around the remote API. Confirm that the API version it targets still exposes every category you need before relying on it.
Does james.xue/laravel-ali-green support Laravel 11 and PHP 8.3?
Probably not out of the box. The package was written for the Laravel 8 to 10 and PHP 7.4 to 8.1 era, and Laravel 11 or 12 plus PHP 8.3 support is unlikely to be declared in its Composer constraints. Check the package's composer.json in a spike and plan to fork with widened constraints or vendor the code if you are on a newer stack.
How does video moderation work in this package?
Alibaba Cloud Green video moderation is asynchronous: you submit a video, then receive results through a callback or by polling a status endpoint. Wrappers like this often handle only the submit call and leave idempotent persistence, callback endpoints, polling helpers, and reconciliation jobs for stuck items to you. Treat the async video pipeline as custom product code rather than something the package solves.
Which Alibaba Cloud Green API version and endpoint does the package target?
This is a thin adapter over an older Alibaba Cloud Green API, and the exact version and endpoint must be verified in the source and config. Aliyun has moved toward newer Green API versions and green-cip endpoints, so a wrapper pinned to a legacy version may be deprecated or missing categories. Confirm that the region and endpoint are configurable before committing to it.
Does it surface Alibaba Cloud rate-limit and error codes clearly?
The package appears to have little field validation and does not clearly document how Aliyun QPS limits and error codes are exposed. You need distinct error handling so you can drive retry and backoff instead of treating every failure the same. Inspect the exception handling in a spike and add your own mapping if the package collapses error details.
Is james.xue/laravel-ali-green safe to use in production?
Treat it as unproven. It has 63 stars, zero dependents, a single maintainer, Chinese-only documentation, and unclear CI or test coverage, so there is little production evidence. The realistic posture is to use it as a reference implementation to fork and own, or hide it behind your own ContentModerator contract so it can be replaced later.
How should I handle credential security and logging with this package?
Use a least-privilege RAM sub-account restricted to Green and keep AccessKey secrets in .env or a secret manager. Verify in a spike that the package does not log or serialize access keys in exceptions, and add redaction if it does. Also review cross-border data transfer and content-residency rules before sending user content to Aliyun from outside mainland China.
Does the package support custom keyword libraries and ad detection?
The description covers text keyword detection plus image ad and QR-code checks, which suggests those categories are available through the underlying Aliyun API. Custom keyword libraries, custom image libraries, and category policy depend on the API version the wrapper targets and are not clearly documented. Test the specific categories you need against a hand-labeled sample set and measure false positives and false negatives, not just that a response returns.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource