Skip to content

route_to doesn't work for post routes #642

Description

@daylightstudio

I have an issue where I have a form in which I want to set the action to the post route using the route_to function. However, because the context of calling that route_to function is using the HTTPVerb that's not post, it doesn't find the route because they are excluded from the route collection. This seems like a common use case for using route_to.

<form action="<?=route_to('user/insert')?>" method="post">
...
</form>

Route Example:

$routes->post('admin/user/insert', 'UserController::insert', ['as' => 'user/insert']);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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