protected function replaceFillable(&$stub, $fields){

        $fillable = [];
        foreach ($fields as $f){
            if($f['add_to']=='fillable') $fillable[] = "\"{$f['name']}\"";
        }
        if(count($fillable)) $fillable = "protected \$fillable = [".implode(',',$fillable)."];";
        else $fillable = "";

        $stub = str_replace('DummyFillable', $fillable, $stub);

        return $this;
    }
protected function replaceFillable(&$stub, $fields){

        $fillable = [];
        foreach ($fields as $f){
            if($f['add_to']=='fillable') $fillable[] = "\"{$f['name']}\"";
        }
        if(count($fillable)) $fillable = "protected \$fillable = [".implode(',',$fillable)."];";
        else $fillable = "";

        $stub = str_replace('DummyFillable', $fillable, $stub);

        return $this;
    }
protected function replaceFillable ( & $ stub , $ fields ) { $ fillable = [ ] ; foreach ( $ fields as $ f ) { if ( $ f [ 'add_to' ] == 'fillable' ) $ fillable [ ] = "\"{$f['name']}\"" ; } if ( count ( $ fillable ) ) $ fillable = "protected \$fillable = [" . implode ( ',' , $ fillable ) . "];" ; else $ fillable = "" ; $ stub = str_replace ( 'DummyFillable' , $ fillable , $ stub ) ; return $ this ; }
Replace fillable dummy.

@param string $stub
@param array  $fields

@return $this
Replace fillable dummy .