Skip to content

Implement version of Laravel's $request->query('key') #913

@garyburgmann

Description

@garyburgmann

Is your feature request related to a problem? Please describe.
Currently request.input('key') will return the query string params if GET, else POST body. Also, the nature of request.input('key') lacks an element of explicitness.

What do we currently have to do now?
As above.

Describe the solution you'd like
A modification of request.input('key'), to return query params if GET, else return body && query params for POST.
Also, addition of request.query('key') in order to make the intent of the programmer explicit.
Happy to take on this pull req. myself.

Describe alternatives you've considered
This could be amended by simply modifying request.input('key'), but in line with trying to match up to Laravel as much as possible, it is prudent to add request.query('key') at the same time.

  • Is this a breaking change?
    No.

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions