Package Data | |
---|---|
Maintainer Username: | danielme85 |
Maintainer Contact: | mellum@gmail.com (Daniel Mellum) |
Package Create Date: | 2016-11-02 |
Package Last Update: | 2018-04-16 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 03:07:37 |
Package Statistics | |
---|---|
Total Downloads: | 11,829 |
Monthly Downloads: | 325 |
Daily Downloads: | 5 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 0 |
Simple Laravel 5 service class for neitanod's forceutf8: https://github.com/neitanod/forceutf8
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.
Add to your config/app.php under Service Providers
//Service Provider
danielme85\ForceUTF8\ForceUTF8ServiceProvider::class,
//Facade
'Encoding' => danielme85\ForceUTF8\Encoding::class,
Add to your boostrap/app.php file
$app->register(danielme85\ForceUTF8\ForceUTF8ServiceProvider::class);
...
$app->configure('app');
...
class_alias('danielme85\ForceUTF8\Encoding', 'Encoding');
$app->withFacades();
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