Sleimanx2\Plastic\Fillers\EloquentFiller::fill PHP Method

fill() public method

Fill the results hists into Model.
public fill ( Model $model, PlasticResult $result ) : mixed | void
$model Illuminate\Database\Eloquent\Model
$result Sleimanx2\Plastic\PlasticResult
return mixed | void
    public function fill(Model $model, Result $result)
    {
        $hits = $result->hits()->map(function ($hit) use($model) {
            return $this->fillModel($model, $hit);
        });
        $result->setHits($hits);
    }