function scandir($path)
    {
        return collect(scandir($path))
                    ->reject(function ($file) {
                        return in_array($file, ['.', '..']);
                    })->values()->all();
    }
function scandir($path)
    {
        return collect(scandir($path))
                    ->reject(function ($file) {
                        return in_array($file, ['.', '..']);
                    })->values()->all();
    }
function scandir ( $ path ) { return collect ( scandir ( $ path ) ) -> reject ( function ( $ file ) { return in_array ( $ file , [ '.' , '..' ] ) ; } ) -> values ( ) -> all ( ) ; }
Scan the given directory path.

@param  string  $path
@return array
Scan the given directory path .