public function loadFile($file)
    {
        if (is_array($file)) {
            return collect($file)->mapWithKeys(function ($subFile, $key) {
                return [$key => $this->loadFile($subFile)];
            })->toArray();
        }

        return $this->parser->parseFile($file);
    }
public function loadFile($file)
    {
        if (is_array($file)) {
            return collect($file)->mapWithKeys(function ($subFile, $key) {
                return [$key => $this->loadFile($subFile)];
            })->toArray();
        }

        return $this->parser->parseFile($file);
    }
public function loadFile ( $ file ) { if ( is_array ( $ file ) ) { return collect ( $ file ) -> mapWithKeys ( function ( $ subFile , $ key ) { return [ $ key => $ this -> loadFile ( $ subFile ) ] ; } ) -> toArray ( ) ; } return $ this -> parser -> parseFile ( $ file ) ; }
Load yaml file.

@param $file

@return mixed|string
Load yaml file .