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

buildFakerAttributes() public method

public buildFakerAttributes ( $attributes )
    public function buildFakerAttributes($attributes)
    {
        $faker = '';
        foreach ($attributes as $attribute) {
            $formatter = $this->fakerMethods[$this->getFieldTypeFromProperties($attribute['properties'])];
            $method = $formatter['method'];
            $parameters = $formatter['parameters'];
            $faker .= "'" . $attribute['name'] . "' => \$faker->" . $method . "(" . $parameters . ")," . PHP_EOL . '        ';
        }
        return rtrim($faker);
    }