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