lots of updates

This commit is contained in:
2022-10-19 14:33:03 -06:00
parent 427d4e2500
commit 625dfeb79f
26 changed files with 771 additions and 714 deletions

View File

@ -0,0 +1,29 @@
<?php
/**
|--------------------------------------------------------------------------
| Global String Functions
|--------------------------------------------------------------------------
|
| This is a home for functions that don't belong to any one class and
| that should be available anywhere in the application.
|
*/
if (! function_exists('snake2Title')) {
/**
* Convert a snake case string to a title with spaces
* and every word capitalized.
*
* @since 1.0.0
*
* @param string $stakeSlug A snake case string, commonly a slug
*
* @return string
*/
function snake2Title(string $snakeSlug): string
{
$output = preg_replace('/\_/', ' ', $snakeSlug);
return ucwords($output);
}
}