skapator / greeklish
Converts Greek characters to latin. Used for slugs mainly
Installs: 185
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 0
Forks: 2
Open Issues: 1
Type:helper
Requires
- php: >=5.3.0
- illuminate/support: 4.2.*
This package is not auto-updated.
Last update: 2022-02-14 01:43:19 UTC
README
Convert Greek characters to latin and make greeklish slugs.
Quick Installation
To install through composer, simply put the following in your composer.json
file:
{ "require": { "skapator/greeklish": "dev-master" } }
Run composer update
to pull down the latest version.
Now open up app/config/app.php
and add the service provider to your providers
array.
'providers' => array( ... 'Skapator\Greeklish\GreeklishServiceProvider', )
Now add the alias.
'aliases' => array( ... 'Greeklish' => 'Skapator\Greeklish\Facades\Greeklish', )
Usage
-- Make Slug.
$text = 'Γεια σου Κόσμε'; Greeklish::slug($text) Will make: `geia-sou-kosme`
-- Make a greeklish text.
$text = 'Γεια σου Κόσμε'; Greeklish::text($text) Will make: `Geia sou kosme`
-- Extra arguments.
Greeklish::text($text, true) // will remove one letter words Greeklish::slug($text, false, true) //will remove two letter words
--