src/Eloquent/Repository.php
public function setBuilder(IlluminateEloquentBuilder $builder = null)
    {
        // If no builder was provided,
        // we'll use the one from this repositorys model
        if (empty($builder)) {
            $builder = $this->getModel()->newQuery();
        }

        // Set repository builder
        $this->builder = $builder;

        return $this;
    }
public function setBuilder(IlluminateEloquentBuilder $builder = null)
    {
        // If no builder was provided,
        // we'll use the one from this repositorys model
        if (empty($builder)) {
            $builder = $this->getModel()->newQuery();
        }

        // Set repository builder
        $this->builder = $builder;

        return $this;
    }
public function setBuilder ( IlluminateEloquentBuilder $ builder = null ) { // If no builder was provided, // we'll use the one from this repositorys model if ( empty ( $ builder ) ) { $ builder = $ this -> getModel ( ) -> newQuery ( ) ; } // Set repository builder $ this -> builder = $ builder ; return $ this ; }
Set repository builder.

@author Morten Rugaard <moru@nodes.dk>

@acecss public
@param  \Illuminate\Database\Eloquent\Builder $builder
@return $this
Set repository builder .