DrawMyAttention\ResourceGenerator\Commands\ResourceMakeCommand::addModelAttributes PHP Method

addModelAttributes() public method

public addModelAttributes ( $name, $attributes, $stub )
    public function addModelAttributes($name, $attributes, $stub)
    {
        $attributes = '[' . collect($this->parseAttributesFromInputString($attributes))->filter(function ($attribute) use($name) {
            return in_array($name, $attribute);
        })->map(function ($attributes, $name) {
            return "'" . $name . "'";
        })->values()->implode(', ') . ']';
        return str_replace(strtoupper($name) . '_PLACEHOLDER', $attributes, $stub);
    }