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

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

        $stub = str_replace('DummyGuarded', $guarded, $stub);

        return $this;
    }