Skip to content

Commit

Permalink
Inline \capitalize() helper
Browse files Browse the repository at this point in the history
  • Loading branch information
danon committed Oct 6, 2023
1 parent 330a677 commit 832b605
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions app/Helpers/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,6 @@ function manifest($path)
return $manifest[$path];
}

/**
* Uppercase first character of each word
*
* @param string $string
* @return string
*/
function capitalize($string)
{
return mb_convert_case($string, MB_CASE_TITLE, 'UTF-8');
}

/**
* @param string|\Carbon\Carbon $dateTime
* @param bool $diffForHumans
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Job/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function country()
*/
public function setCityAttribute($city)
{
$this->attributes['city'] = capitalize($city);
$this->attributes['city'] = \mb_convert_case($city, \MB_CASE_TITLE, 'UTF-8');
}

/**
Expand Down

0 comments on commit 832b605

Please sign in to comment.