Skip to content

Route can not work: Controller or its method is not found #2299

Description

@brucelin

When I add a route as the document described:

$routes->add('products/([a-z]+)/(\d+)', '$1::id_$2');

But it shows the error:

Controller or its method is not found: \App\Controllers$1::id_12

CodeIgniter 4 version
rc-2.1

Affected module(s)
Router

Context

  • OS: Win7
  • PHP 7.3.10
  • Spark Server

Maybe Some regular expression replacement error occurred when match the uri.

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

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions