Laravel String Helper Function: snake
The snake helper method in Laravel's Str class converts a string to snake case by replacing uppercase letters with the lowercased variant, optionally separated by a delimiter. The method also trims whitespace from the string being converted. Laravel provides a global snake_case function as a shortcut to calling Str::snake.