// the find
overtrue/laravel-pinyin
:cn: Chinese to Pinyin translator for Laravel
A thin Laravel service-provider wrapper around overtrue/pinyin, giving you a `pinyin()` helper, a facade, and DI-container access to convert Chinese text to pinyin. Useful if you're building something like a slug generator, search index, or sorting key for Chinese content in a Laravel app and don't want to wire up the underlying library yourself.
Auto-discovery means zero manual service provider registration in modern Laravel. It exposes overtrue/pinyin 6.0's memory/performance strategies (memory-optimized, cached, smart, auto) directly, so you can tune for a long-running queue worker vs. a one-off web request without touching the core library's API. The helper functions (pinyin(), pinyin_abbr(), pinyin_permalink()) cover the common cases people actually reach for — slugs and abbreviations — instead of just exposing a raw convert method.
The directory tree is basically three files (ServiceProvider, Facade, helpers) — there's no code here beyond glue, so you're really evaluating overtrue/pinyin itself and just trusting this wrapper stays in sync with it. No config file is published for setting a default strategy app-wide, so you're calling Pinyin::useCached() etc. manually wherever it matters. The README has zero mention of test coverage or a test suite, and there's no indication of tone-mark handling edge cases (e.g. multi-pronunciation characters) beyond what upstream documents.