src/Importing.php
/**
     * Return a default transform function which transforms a model to the format used by the import method (simple bulk API).
     *
     * The callable receives one argument: the model to be transformed. It should return an array of the following form:
     *
     *     [action => ['_id' => id, 'data' => data]]
     *
     * Where action is typically *index*, but could also be *create*, *delete* or *update*. There is no need to specify *index* or *type* in the array, those are specified in the main request. The *delete* action does not require a *data* item.
     *
     * @return callable
     */
Return a default transform function which transforms a model to the format used by the import method (simple bulk API).
The callable receives one argument: the model to be transformed. It should return an array of the following form.





@return callable
Return a default transform function which transforms a model to the format used by the import method ( simple bulk API ) . The callable receives one argument : the model to be transformed . It should return an array of the following form . @return callable
public function transform()
    {
        return function ($model) {
            return [
                'index' => [
                    '_id' => $model->id,
                    'data' => $model->toIndexedArray(),
                ],
            ];
        };
    }
public function transform ( ) { return function ( $ model ) { return [ 'index' => [ '_id' => $ model -> id , 'data' => $ model -> toIndexedArray ( ) , ] , ] ; } ; }
Return a default transform function which transforms a model to the format used by the import method (simple bulk API).
Return a default transform function which transforms a model to the format used by the import method ( simple bulk API ) .