protected function addSoftDelete(&$stub)
    {
        $traitIncl = $trait = '';

        if ($this->option('softdelete')) {
            $traitIncl = 'use Illuminate\Database\Eloquent\SoftDeletes;';
            $trait = 'use SoftDeletes;';
        }

        $stub = str_replace('//DummySDTraitInclude', $traitIncl, $stub);
        $stub = str_replace('//DummySDTrait', $trait, $stub);

        return $this;
    }
protected function addSoftDelete(&$stub)
    {
        $traitIncl = $trait = '';

        if ($this->option('softdelete')) {
            $traitIncl = 'use Illuminate\Database\Eloquent\SoftDeletes;';
            $trait = 'use SoftDeletes;';
        }

        $stub = str_replace('//DummySDTraitInclude', $traitIncl, $stub);
        $stub = str_replace('//DummySDTrait', $trait, $stub);

        return $this;
    }
protected function addSoftDelete ( & $ stub ) { $ traitIncl = $ trait = '' ; if ( $ this -> option ( 'softdelete' ) ) { $ traitIncl = 'use Illuminate\Database\Eloquent\SoftDeletes;' ; $ trait = 'use SoftDeletes;' ; } $ stub = str_replace ( '//DummySDTraitInclude' , $ traitIncl , $ stub ) ; $ stub = str_replace ( '//DummySDTrait' , $ trait , $ stub ) ; return $ this ; }
Add SoftDelete to the given stub.

@param string $stub

@return $this
Add SoftDelete to the given stub .