"Call to undefined function str_slug()" in Laravel 6.0

If you have gone through the upgrade guide then you must know that

String and Array Helpers have been removed from Core Framework

So if if You need to still use the helper install the package

composer require laravel/helpers

and all the helpers are moved to this package


String and Array helpers are removed from laravel 6.0 Core Framework

https://laravel.com/docs/6.0/upgrade#helpers

So if You need to still use the helper install the package

composer require laravel/helpers

Or you can use by Laravel facade

use Illuminate\Support\Str;
$slug = Str::slug('Laravel 5 Framework', '-');