Created
May 24, 2015 18:11
-
-
Save jatubio/00ff81c042d907c8fc0a to your computer and use it in GitHub Desktop.
array_change_key_case for stdClass Objects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Works withs stdClass Objects | |
static function array_change_key_case($input, $case ) | |
{ | |
$array = array_change_key_case((array)$input, $case ); | |
return (object) $array; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample to lower case keys of a fetched query with Query Builder of Laravel: