public function loadJsonFiles($dir)
    {
        return coollect(glob("$dir/*.json*"))->mapWithKeys(function ($file) {
            $key = str_replace('.json', '', str_replace('.json5', '', basename($file)));

            return [$key => $this->loadJson($file)];
        });
    }
public function loadJsonFiles($dir)
    {
        return coollect(glob("$dir/*.json*"))->mapWithKeys(function ($file) {
            $key = str_replace('.json', '', str_replace('.json5', '', basename($file)));

            return [$key => $this->loadJson($file)];
        });
    }
public function loadJsonFiles ( $ dir ) { return coollect ( glob ( "$dir/*.json*" ) ) -> mapWithKeys ( function ( $ file ) { $ key = str_replace ( '.json' , '' , str_replace ( '.json5' , '' , basename ( $ file ) ) ) ; return [ $ key => $ this -> loadJson ( $ file ) ] ; } ) ; }
Load json files from dir.

@param $dir
@return \PragmaRX\Coollection\Package\Coollection
Load json files from dir .