minhvq / custom-string
自定义字符串包
dev-master
2022-05-31 09:05 UTC
This package is auto-updated.
Last update: 2024-09-29 06:09:08 UTC
README
将字符串 "HELLO" 添加到第一个输入字符串
安装
此项目使用 composer。
$ composer require minhvq/custom-string
在 composer.json 中声明自动加载命名空间
"autoload": {
"psr-4": {
...
"MinhVuQuang\\CustomString\\": "vendor/minhvq/custom-string/src/"
},
...
},
然后运行
$ composer dumpautoload
最后,在 config/app.php 中添加 CustomStringServiceProvider
MinhVuQuang\CustomString\CustomStringServiceProvider::class,
用法
echo MinhVuQuang\CustomString\Facades\CustomString::generate(Illuminate\Support\Str::random(40));