PHPackages                             mucts/laravel-pinyin - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mucts/laravel-pinyin

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mucts/laravel-pinyin
====================

Chinese to Pinyin translator.

1.2.3(5y ago)141MITPHPPHP ^7.4CI failing

Since May 6Pushed 5y agoCompare

[ Source](https://github.com/mucts/laravel-pinyin)[ Packagist](https://packagist.org/packages/mucts/laravel-pinyin)[ RSS](/packages/mucts-laravel-pinyin/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (3)Versions (15)Used By (0)

[![](https://camo.githubusercontent.com/e27473a2cc76c25e71f47614427ff9e36425423a903be0290741a035ed26d42b/68747470733a2f2f696d616765732e6d756374732e636f6d2f696d6167652f6578705f6465665f77686974652e706e67)](https://camo.githubusercontent.com/e27473a2cc76c25e71f47614427ff9e36425423a903be0290741a035ed26d42b/68747470733a2f2f696d616765732e6d756374732e636f6d2f696d6167652f6578705f6465665f77686974652e706e67)

 [![Build Status](https://camo.githubusercontent.com/7daff49b78e46051811996f76218690767bbc3040b2eb8646f0b991091f24994/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d756374732f6c61726176656c2d70696e79696e2f6261646765732f6275696c642e706e67)](https://scrutinizer-ci.com/g/mucts/laravel-pinyin) [![Code Intelligence Status](https://camo.githubusercontent.com/86df25e92cf80916c1ab28615f99f7df6b4704b2890d07e36d6e2a735eebacf6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d756374732f6c61726176656c2d70696e79696e2f6261646765732f636f64652d696e74656c6c6967656e63652e737667)](https://scrutinizer-ci.com/g/mucts/laravel-pinyin) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/fa08747e960453cf3ab8b14ca6ad68170a5ef1490ac4cc40a91e6564bb021a4c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d756374732f6c61726176656c2d70696e79696e2f6261646765732f7175616c6974792d73636f72652e706e67)](https://scrutinizer-ci.com/g/mucts/laravel-pinyin) [![Total Downloads](https://camo.githubusercontent.com/20e5211fc1b75a00f8c62eceda820283b318640890533827ccd4ee4c15dc2f23/68747470733a2f2f706f7365722e707567782e6f72672f6d756374732f6c61726176656c2d70696e79696e2f642f746f74616c2e737667)](https://packagist.org/packages/mucts/laravel-pinyin) [![Latest Stable Version](https://camo.githubusercontent.com/df35b0ec47d899068c215599461a60fa1f741ce79bb56fee08a7532387389540/68747470733a2f2f706f7365722e707567782e6f72672f6d756374732f6c61726176656c2d70696e79696e2f762f737461626c652e737667)](https://packagist.org/packages/mucts/laravel-pinyin) [![License](https://camo.githubusercontent.com/5c275b3f23fd97382b3cc32e66257a60c2a54922aab72c71bf82b45ae2e974fd/68747470733a2f2f706f7365722e707567782e6f72672f6d756374732f6c61726176656c2d70696e79696e2f6c6963656e73652e737667)](https://packagist.org/packages/mucts/laravel-pinyin)

laravel-pinyin
==============

[](#laravel-pinyin)

Chinese to Pinyin translator for Laravel 7 based on [mucts/pinyin](https://github.com/mucts/pinyin).

Install
-------

[](#install)

```
composer require mucts/laravel-pinyin
```

Usage
-----

[](#usage)

you can get the instance of `MuCTS\Pinyin\Pinyin` from app container:

```
$pinyin = app('pinyin');
echo $pinyin->sentence('带着希望去旅行，比到达终点更美好');
// dài zhe xī wàng qù lǔ xíng, bǐ dào dá zhōng diǎn gèng měi hǎo
```

Using facade:

```
use Pinyin; // Facade class, NOT MuCTS\Pinyin\Pinyin

var_dump(Pinyin::convert('带着希望去旅行'));
// ["dai", "zhe", "xi", "wang", "qu", "lv", "xing"]

echo Pinyin::sentence('带着希望去旅行，比到达终点更美好');
// dài zhe xī wàng qù lǔ xíng, bǐ dào dá zhōng diǎn gèng měi hǎo
```

About `mucts/pinyin` specific configuration and use, refer to: [mucts/pinyin](https://github.com/mucts/pinyin)

License
-------

[](#license)

MIT

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

14

Last Release

2176d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/102022?v=4)[Herry Leonard](/maintainers/herry)[@herry](https://github.com/herry)

---

Top Contributors

[![yuandeng](https://avatars.githubusercontent.com/u/69410645?v=4)](https://github.com/yuandeng "yuandeng (24 commits)")

---

Tags

laravel-pinyinpinyinlaravelPinyin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mucts-laravel-pinyin/health.svg)

```
[![Health](https://phpackages.com/badges/mucts-laravel-pinyin/health.svg)](https://phpackages.com/packages/mucts-laravel-pinyin)
```

###  Alternatives

[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

97139.6k2](/packages/nickurt-laravel-akismet)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[forxer/laravel-gravatar

A library providing easy gravatar integration in a Laravel project.

4235.6k](/packages/forxer-laravel-gravatar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
