slug in laravel code example
Example 1: Str slug laravel
use Illuminate\Support\Str;
$slug = Str::slug('Laravel 5 Framework', '-');
// laravel-5-framework
Example 2: laravel slug
$ composer require cviebrock/eloquent-sluggable
Example 3: laravel slug
php artisan vendor:publish --provider="Cviebrock\EloquentSluggable\ServiceProvider"