src/Eloquent/Repository.php
public function withTrashed()
    {
        // Validate model is soft deletable
        if (! in_array(IlluminateEloquentSoftDeletes::class, class_uses($this->getModel()))) {
            throw new ModelNotSoftDeletable('Model [%s] is not using the Soft Delete trait');
        }

        // Set repository builder to include soft deleted entries
        $this->setBuilder($this->getModel()->withTrashed());

        return $this;
    }
public function withTrashed()
    {
        // Validate model is soft deletable
        if (! in_array(IlluminateEloquentSoftDeletes::class, class_uses($this->getModel()))) {
            throw new ModelNotSoftDeletable('Model [%s] is not using the Soft Delete trait');
        }

        // Set repository builder to include soft deleted entries
        $this->setBuilder($this->getModel()->withTrashed());

        return $this;
    }
public function withTrashed ( ) { // Validate model is soft deletable if ( ! in_array ( IlluminateEloquentSoftDeletes :: class , class_uses ( $ this -> getModel ( ) ) ) ) { throw new ModelNotSoftDeletable ( 'Model [%s] is not using the Soft Delete trait' ) ; } // Set repository builder to include soft deleted entries $ this -> setBuilder ( $ this -> getModel ( ) -> withTrashed ( ) ) ; return $ this ; }
Include soft deleted entries in query.
Note this will reset the build

@author Morten Rugaard <moru@nodes.dk>

@throws \Nodes\Database\Exceptions\ModelNotSoftDeletable
Include soft deleted entries in query . Note this will reset the build