str random name laravel 7 code example Example: laravel str::random use Illuminate\Support\Str; $random = Str::random(40);