Skip to content

Reverse routing with Route::controller() #11

Closed
@jasonlewis

Description

@jasonlewis

This may be intentional but I thought I'd bring it up just to double check.

If you use Route::controller() you can't use reverse routing for any of the actions on the controller. I believe this is because UrlGenerator::action() simply compares the _uses option of the route against the action provided. The requirements for a route aren't actually expanded.

A solution would be to convert the requirements into their regular expression equivalents and then compare the actions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions