src/Prettus/Repository/Eloquent/BaseRepository.php
public function parserResult($result)
    {
        if ($this->presenter instanceof PresenterInterface) {
            if ($result instanceof Collection || $result instanceof LengthAwarePaginator) {
                $result->each(function ($model) {
                    if ($model instanceof Presentable) {
                        $model->setPresenter($this->presenter);
                    }

                    return $model;
                });
            } elseif ($result instanceof Presentable) {
                $result = $result->setPresenter($this->presenter);
            }

            if (!$this->skipPresenter) {
                return $this->presenter->present($result);
            }
        }

        return $result;
    }
public function parserResult($result)
    {
        if ($this->presenter instanceof PresenterInterface) {
            if ($result instanceof Collection || $result instanceof LengthAwarePaginator) {
                $result->each(function ($model) {
                    if ($model instanceof Presentable) {
                        $model->setPresenter($this->presenter);
                    }

                    return $model;
                });
            } elseif ($result instanceof Presentable) {
                $result = $result->setPresenter($this->presenter);
            }

            if (!$this->skipPresenter) {
                return $this->presenter->present($result);
            }
        }

        return $result;
    }
public function parserResult ( $ result ) { if ( $ this -> presenter instanceof PresenterInterface ) { if ( $ result instanceof Collection || $ result instanceof LengthAwarePaginator ) { $ result -> each ( function ( $ model ) { if ( $ model instanceof Presentable ) { $ model -> setPresenter ( $ this -> presenter ) ; } return $ model ; } ) ; } elseif ( $ result instanceof Presentable ) { $ result = $ result -> setPresenter ( $ this -> presenter ) ; } if ( ! $ this -> skipPresenter ) { return $ this -> presenter -> present ( $ result ) ; } } return $ result ; }
Wrapper result data

@param mixed $result

@return mixed
Wrapper result data