backend/helper/scout-sonic-engine/src/SonicEngine.php
/**
     * Remove the given model from the index.
     *
     * @param  \Illuminate\Database\Eloquent\Collection|\Illuminate\Support\Collection  $models
     * @throws \SonicSearch\NoConnectionException If the connection to Sonic has been lost in the meantime.
     * @throws \SonicSearch\CommandFailedException If execution of the command failed for which-ever reason.
     *
     * @return void
     */
Remove the given model from the index.

@return void
Remove the given model from the index . @return void
public function delete($models)
    {
        $this->ingest->ping();
        $models->map(function ($model) {
            $bucket = class_basename($model);
            $this->ingest->flush(str_plural($bucket), $bucket, $model->getScoutKey());
        })->values()->all();
    }
public function delete ( $ models ) { $ this -> ingest -> ping ( ) ; $ models -> map ( function ( $ model ) { $ bucket = class_basename ( $ model ) ; $ this -> ingest -> flush ( str_plural ( $ bucket ) , $ bucket , $ model -> getScoutKey ( ) ) ; } ) -> values ( ) -> all ( ) ; }
Remove the given model from the index.
Remove the given model from the index .