danielme85/laravel-forceutf8
Composer 安装命令:
composer require danielme85/laravel-forceutf8
包简介
Simple Laravel 5 service class for neitanod's forceutf8. https://github.com/neitanod/forceutf8
README 文档
README
Simple Laravel 5 service class for neitanod's forceutf8: https://github.com/neitanod/forceutf8
Install
Add to composer.json
"require": {
"danielme85/laravel-forceutf8": "dev-master",
....
}
If you use Laravel 5.5+ you could skip the next step as Composer/Laravel Auto-discovery has been enabled for this package.
Laravel 5.x
Add to your config/app.php under Service Providers
//Service Provider
danielme85\ForceUTF8\ForceUTF8ServiceProvider::class,
//Facade
'Encoding' => danielme85\ForceUTF8\Encoding::class,
Lumen 5.x
Add to your boostrap/app.php file
$app->register(danielme85\ForceUTF8\ForceUTF8ServiceProvider::class);
...
$app->configure('app');
...
class_alias('danielme85\ForceUTF8\Encoding', 'Encoding');
$app->withFacades();
Usage
use danielme85\ForceUTF8\Encoding;
...
$newstring = Encoding::toUTF8($string);
Chekout neitanod's repo for more information on how to use the Encoding class: https://github.com/neitanod/forceutf8
统计信息
- 总下载量: 15.45k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-02