Added code to return the entire array to Arr::dot.
This commit is contained in:
@@ -37,6 +37,11 @@ class Arr {
|
|||||||
*/
|
*/
|
||||||
public static function dot($array, $key, $default = null)
|
public static function dot($array, $key, $default = null)
|
||||||
{
|
{
|
||||||
|
if (is_null($key))
|
||||||
|
{
|
||||||
|
return $array;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (explode('.', $key) as $segment)
|
foreach (explode('.', $key) as $segment)
|
||||||
{
|
{
|
||||||
if ( ! isset($array[$segment]))
|
if ( ! isset($array[$segment]))
|
||||||
|
|||||||
Reference in New Issue
Block a user