public function shapeFile($dir)
    {
        $shapeRecords = new ShapeFile($dir);

        $result = [];

        foreach ($shapeRecords as $record) {
            if ($record['dbf']['_deleted']) {
                continue;
            }

            $data = $record['dbf'];

            unset($data['_deleted']);

            $result[] = $data;
        }

        unset($shapeRecords);

        return coollect($result)->mapWithKeys(function ($fields, $key1) {
            return [
                strtolower($key1) => coollect($fields)->mapWithKeys(function ($value, $key2) {
                    return [strtolower($key2) => $value];
                }),
            ];
        });
    }
public function shapeFile($dir)
    {
        $shapeRecords = new ShapeFile($dir);

        $result = [];

        foreach ($shapeRecords as $record) {
            if ($record['dbf']['_deleted']) {
                continue;
            }

            $data = $record['dbf'];

            unset($data['_deleted']);

            $result[] = $data;
        }

        unset($shapeRecords);

        return coollect($result)->mapWithKeys(function ($fields, $key1) {
            return [
                strtolower($key1) => coollect($fields)->mapWithKeys(function ($value, $key2) {
                    return [strtolower($key2) => $value];
                }),
            ];
        });
    }
public function shapeFile ( $ dir ) { $ shapeRecords = new ShapeFile ( $ dir ) ; $ result = [ ] ; foreach ( $ shapeRecords as $ record ) { if ( $ record [ 'dbf' ] [ '_deleted' ] ) { continue ; } $ data = $ record [ 'dbf' ] ; unset ( $ data [ '_deleted' ] ) ; $ result [ ] = $ data ; } unset ( $ shapeRecords ) ; return coollect ( $ result ) -> mapWithKeys ( function ( $ fields , $ key1 ) { return [ strtolower ( $ key1 ) => coollect ( $ fields ) -> mapWithKeys ( function ( $ value , $ key2 ) { return [ strtolower ( $ key2 ) => $ value ] ; } ) , ] ; } ) ; }
Load a shapeFile.

@param $dir
@return \PragmaRX\Coollection\Package\Coollection
Load a shapeFile .