15/11
2015
Laravel 5.1 Slug Package
You should install this package through Composer., (*2)
Edit your project's composer.json
file to require raccoonsoftware/slug
., (*3)
"require": { "raccoonsoftware/slug": "*" },
Next, update Composer from the Terminal:
composer update
, (*4)
Once this operation completes, the final step is to add the service provider.
Open app/config/app.php
, and add a new item to the providers array., (*5)
'RaccoonSoftware\Slug\SlugServiceProvider::class',
, (*6)
And add a new item to the aliases array., (*7)
'Slug' => 'RaccoonSoftware\Slug\Facade\Slug::class',
, (*8)
Call of the method: Slug::convert($text)
, (*9)
Call of the method with specific separator: Slug::convert($text, '_')
., (*10)