public function executeForEach(Closure $callback): void
    {
        $query = $this->newQuery();

        foreach ($query->cursor() as $entity) {
            $callback($entity);
        }
    }
public function executeForEach(Closure $callback): void
    {
        $query = $this->newQuery();

        foreach ($query->cursor() as $entity) {
            $callback($entity);
        }
    }
public function executeForEach ( Closure $ callback ) : void { $ query = $ this -> newQuery ( ) ; foreach ( $ query -> cursor ( ) as $ entity ) { $ callback ( $ entity ) ; } }
Execute query via cursor.

@param  \Closure  $callback

@return void
Execute query via cursor .