Skip to content

Changing keys into CreateResourceRequest.php #3

@ala747

Description

@ala747

Hi! Thanks for this great tool, it's being very useful!

I need to change the naming convention ('model' and 'model.property') for keys into the generated code, ie. current:

    public function rules()
    {
        return [
            '**role**' => 'array|required',
            '**role**.name' => 'required|string'
        ];
    }
    public function attributes()
    {
        return [
            '**role**.name' => 'the role\'s name'
        ];
    }

ie. desired:

    public function rules()
    {
        return [
            '**name**' => 'required|string'
        ];
    }
    public function attributes()
    {
        return [
            '**name**' => 'the role\'s name'
        ];
    }

in order to be able to POST/PATCH the properties without the model wrapper but I can't find where are those lines generated. Could you please point me in the right direction?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions