We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 107bc89 commit e2ca202Copy full SHA for e2ca202
2 files changed
composer.json
@@ -15,7 +15,7 @@
15
],
16
"require": {
17
"overtrue/pinyin": "~4.0",
18
- "topthink/framework": "6.0.*"
+ "topthink/framework": "6.0.*|5.1.*"
19
},
20
"autoload": {
21
"psr-4": {
src/helpers.php
@@ -1,6 +1,11 @@
1
<?php
2
use Overtrue\Pinyin\Pinyin;
3
4
+// 兼容 5.1 版本
5
+if (strpos(\think\App::VERSION, '5.1') !== false) {
6
+ bind('pinyin', Pinyin::class);
7
+}
8
+
9
if (!function_exists('pinyin')) {
10
/**
11
* Get the Pinyin of given string.
0 commit comments