public function makeAllSearchable()
    {
        $this->chunk(100, function (Collection $models) {
            $models = $models->map(function (Searchable $model) {
                $model->setSearchableAs($this->searchableAs());
                $model->setClassMetaData($this->getClassMetadata());

                return $model;
            });

            $this->searchableUsing()->update($models);

            event(new ModelsImported($models));
        });
    }
public function makeAllSearchable()
    {
        $this->chunk(100, function (Collection $models) {
            $models = $models->map(function (Searchable $model) {
                $model->setSearchableAs($this->searchableAs());
                $model->setClassMetaData($this->getClassMetadata());

                return $model;
            });

            $this->searchableUsing()->update($models);

            event(new ModelsImported($models));
        });
    }
public function makeAllSearchable ( ) { $ this -> chunk ( 100 , function ( Collection $ models ) { $ models = $ models -> map ( function ( Searchable $ model ) { $ model -> setSearchableAs ( $ this -> searchableAs ( ) ) ; $ model -> setClassMetaData ( $ this -> getClassMetadata ( ) ) ; return $ model ; } ) ; $ this -> searchableUsing ( ) -> update ( $ models ) ; event ( new ModelsImported ( $ models ) ) ; } ) ; }
Make all searchable
Make all searchable