2017 © Pedro Peláez
 

library chinese-slug

Laravel Package for translate string to english, then use it to create a slug

image

jiemoon/chinese-slug

Laravel Package for translate string to english, then use it to create a slug

  • Sunday, April 9, 2017
  • by jiemoon
  • Repository
  • 1 Watchers
  • 1 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 4 % Grown

The README.md

chinese-slug

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

Laravel Package for translate string to english, then use it to create a slug., (*2)

Structure

If any of the following are applicable to your project, then the directory structure should follow industry best practises by being named the following.., (*3)

src/
tests/

Install

Via Composer, (*4)

``` bash $ composer require jiemoon/chinese-slug, (*5)


## Usage Modify `.env`, Add Biadu Fanyi Config. > You can get the config, after register an account in [api.fanyi.baidu.com](http://api.fanyi.baidu.com/api/trans/product/index)

BAIDU_FANYI_API_ID=xxx BAIDU_FANYI_API_SECRET=xxx, (*6)


Edit `cofig/app.php` Add Provider and Alias ```php Jiemoon\ChineseSlug\ChineseSlugServiceProvider::class, ... 'ChineseSlug' => Jiemoon\ChineseSlug\Facades\ChineseSlug::class,

``` php $slug = \ChineseSlug::generateUniqueSlug($title, 'posts');, (*7)

or

$slug = app('chineseslug')->generateUniqueSlug($title, 'posts');, (*8)


## Change log Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. ## Testing ``` bash $ phpunit

License

The MIT License (MIT). Please see License File for more information., (*9)

The Versions

09/04 2017

dev-master

9999999-dev

Laravel Package for translate string to english, then use it to create a slug

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar jiemoon

09/04 2017

0.1.0

0.1.0.0

Laravel Package for translate string to english, then use it to create a slug

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar jiemoon