protected function replaceSoftDelete(&$stub, $shouldUseSoftDelete)
    {
        if ($shouldUseSoftDelete) {
            $stub = $this->strReplace('use_soft_delete', PHP_EOL . 'use Illuminate\Database\Eloquent\SoftDeletes;' . PHP_EOL, $stub);
            $stub = $this->strReplace('use_soft_delete_trait', PHP_EOL . '    use SoftDeletes;' . PHP_EOL, $stub);

            return $this;
        }

        $stub = $this->strReplace('use_soft_delete', null, $stub);
        $stub = $this->strReplace('use_soft_delete_trait', null, $stub);

        return $this;
    }
protected function replaceSoftDelete(&$stub, $shouldUseSoftDelete)
    {
        if ($shouldUseSoftDelete) {
            $stub = $this->strReplace('use_soft_delete', PHP_EOL . 'use Illuminate\Database\Eloquent\SoftDeletes;' . PHP_EOL, $stub);
            $stub = $this->strReplace('use_soft_delete_trait', PHP_EOL . '    use SoftDeletes;' . PHP_EOL, $stub);

            return $this;
        }

        $stub = $this->strReplace('use_soft_delete', null, $stub);
        $stub = $this->strReplace('use_soft_delete_trait', null, $stub);

        return $this;
    }
protected function replaceSoftDelete ( & $ stub , $ shouldUseSoftDelete ) { if ( $ shouldUseSoftDelete ) { $ stub = $ this -> strReplace ( 'use_soft_delete' , PHP_EOL . 'use Illuminate\Database\Eloquent\SoftDeletes;' . PHP_EOL , $ stub ) ; $ stub = $ this -> strReplace ( 'use_soft_delete_trait' , PHP_EOL . '    use SoftDeletes;' . PHP_EOL , $ stub ) ; return $ this ; } $ stub = $ this -> strReplace ( 'use_soft_delete' , null , $ stub ) ; $ stub = $ this -> strReplace ( 'use_soft_delete_trait' , null , $ stub ) ; return $ this ; }
Replaces useSoftDelete and useSoftDeleteTrait for the given stub.

@param  string  $stub
@param  bool  $shouldUseSoftDelete

@return $this
Replaces useSoftDelete and useSoftDeleteTrait for the given stub .