I have upgraded Laravel from 5.6 to 6.0. Previously, default helper functions were running fine on the controllers, but now it says \"undefined.\" In my con
Add the following string library.
use Illuminate\Support\Str;
now you can use it as below.
$filename = Str::random(40)
alternatively, install the following package.
composer require laravel/helpers