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 Help Plugin Laravel Package

chowjiawei/laravel-help-plugin

A lightweight Laravel helper package offering a collection of practical utility functions for common development tasks. It helps streamline everyday PHP and Laravel workflows, reduce boilerplate, and keep your application code cleaner, more readable, and easier to maintain.

View on GitHub
Deep Wiki
Context7

Getting Started

Install and publish

composer require chowjiawei/laravel-help-plugin
php artisan vendor:publish --provider="Chowjiawei\LaravelHelp\HelpServiceProvider"

If the package does not ship auto-discovery (older Chinese packages sometimes don't), register the provider and any facade manually in config/app.php. Check the repo's composer.json extra.laravel block first — that tells you what's auto-registered.

Where to look first

  1. config/help.php (or whatever the published config is named) — this is the map of everything the package does. Read it top to bottom; it will list the DingTalk/WeCom webhook keys, WeChat app credentials, openexchangerates app id, Douyin/TikTok shop credentials, and any default currency/country settings.
  2. src/ for the service classes and any Facades/ directory — the public surface is usually a handful of facades plus a notification channel.
  3. The migration/command directories if the Douyin/TikTok/pay features persist orders or callbacks locally.

First use case

The lowest-risk entry point is the DingTalk or WeCom robot notifier, because it needs only a webhook URL and no OAuth flow. Wire it inline:

use Chowjiawei\LaravelHelp\Facades\Help; // verify exact facade name in src/

Help::dingTalk()->text('Deploy finished on prod');

Then move to the country list and pinyin helpers, which are pure functions and safe to unit-test without credentials. Only after those work should you touch WeChat template messages or the Douyin/TikTok payment flows, which require real merchant credentials and sandbox environments.

Implementation Patterns

Laravel notifications (the recommended integration)

The description explicitly mentions "消息通知" with WeChat template/broadcast drivers. The cleanest fit is to treat these as notification channels, so business code stays decoupled:

// app/Notifications/OrderPaid.php
public function via($notifiable): array
{
    return ['wechat_template', 'dingtalk'];
}

public function toWeChatTemplate($notifiable): array
{
    return [
        'template_id' => config('help.wechat.templates.order_paid'),
        'url'         => route('orders.show', $this->order),
        'data'        => [
            'first'    => 'Order paid',
            'keyword1' => $this->order->number,
            'keyword2' => number_format($this->order->total, 2),
        ],
    ];
}

Then $user->notify(new OrderPaid($order)). Verify the channel class names against the package source — Chinese packages frequently name them differently from Laravel convention.

Robot webhooks for ops alerts

Both DingTalk and WeCom robots are webhook-based and stateless. Wrap them in a small OpsAlert service so you can swap transports later:

class OpsAlert
{
    public function __construct(private string $channel = 'dingtalk') {}

    public function send(string $message, array $atMobiles = []): void
    {
        match ($this->channel) {
            'dingtalk' => Help::dingTalk()->at($atMobiles)->markdown('Alert', $message),
            'wecom'    => Help::weCom()->text($message),
        };
    }
}

Use these for deployment notices, queue-failure alerts, and payment-callback mismatches — the highest-value use of a package like this.

Exchange rates: cache aggressively

openexchangerates free tiers are rate-limited and per-app-id. Never call it inline in a request. Pattern:

$rate = Cache::remember("fx:{$from}:{$to}", now()->addHours(6), function () use ($from, $to) {
    return Help::exchangeRate()->convert($from, $to); // verify method signature
});

For settlement math where the rate must be locked to the order, persist the rate on the order row at creation time and use the package only to fetch it. The "custom rate" feature is for exactly this — overriding upstream rates with a negotiated/contract rate.

Country list + pinyin

Country list is a lookup — cache it once per process. The pinyin feature converts Chinese pinyin to Wade-Giles, which is unusual (most devs expect Hanyu Pinyin or slug generation). Use it only if you actually need Wade-Giles output for names or shipping labels; otherwise use a dedicated transliteration package.

Douyin / TikTok pay flows

Follow the standard two-phase pattern regardless of how the package exposes it:

  1. Create order → persist a local pending order with your own out_order_no before calling the API.
  2. Handle callback → verify signature, look up by out_order_no, make the state transition idempotent inside a DB transaction, then acknowledge to the platform.

Never trust the callback body for the amount — re-query the platform's order status with your stored order. Douyin and TikTok both provide query endpoints; the package should expose them alongside create/pay.

Gotchas and Tips

  • Small community, thin docs (67 stars, likely Chinese-only README). Pin the version in composer.json ("chowjiawei/laravel-help-plugin": "^1.2" rather than *) and read src/ before relying on a method signature. Treat the README as a hint, not a contract. Add a thin wrapper class around each feature so you can swap the package out without touching business code.
  • Config caching bites. After php artisan config:cache, any config() call that reads a published config file with unusual keys still works — but if the package reads env() directly at runtime, it will return null in production. Grep the source for env( outside config/ and move those into your .env + config file if needed.
  • Secrets in webhooks. DingTalk/WeCom webhook URLs contain an access token; treat them as secrets. Don't log the composed URL on failure — redact the token segment before writing to your log channel.
  • Idempotency for payment callbacks. Douyin/TikTok retry callbacks. Wrap your handler in DB::transaction and guard with a unique index on (platform, out_order_no) or a payment_events table keyed by the platform's event id. Duplicate callbacks returning 500 will cause repeated retries and can look like a failed order to the platform.
  • Timezones and currency rounding. Exchange rate values arrive as floats; round with bcmath or intdiv on minor units, not round(). Payment amounts in CNY should be integer fen. The package may hand you raw platform integers; don't mix them with a float-typed local column.
  • Wade-Giles, not Hanyu Pinyin. The pinyin converter produces Wade-Giles romanization. If you expected Zhāng Wěi-style output you'll get Chang Wei-style instead. Check before shipping it into user-facing URLs or slugs.
  • Extension points. If the package uses Laravel's notification system, you can register a custom channel subclass and override send() without forking. If it uses facades with a getFacadeAccessor() binding, you can app()->bind() a decorator around the underlying service in a service provider — this is usually the cleanest way to add retry/circuit-breaker logic around the exchange-rate and payment calls.
  • Debugging failed webhook sends. Most of these packages throw a generic exception on non-2xx responses. Catch, log the response body, and assert the HTTP client is using the right proxy/CA bundle — corporate proxies are a common cause of "DingTalk robot works locally, fails in CI."
  • Vendor lock-in risk. Given the low maintenance signal, isolate each feature area (notifications, fx, payment) behind an interface in your own app/ namespace. If the package goes stale you can reimplement one interface at a time rather than rewrite integration code.
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.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
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