[Solved]Named route not found


Using CakePHP 3.5.17 and I want to use a custom named route.

I defined my route like this : Router::connect('/:username',['controller' => 'Tweet', 'action' => 'index'],['username' => '[a-z0-9-_]+', 'pass' =>['username']],['_name' => 'profil']);

And i’m trying to it like this :


But CakePHP 3 say " Missing Route Cake\Routing\Exception\MissingRouteException Error: A route matching “profil” could not be found."

Can you help me

you have too many parameters, connect have only 3 and you gave 4, the _name should be in 3rd array

    'username' => '[a-z0-9-_]+',
    'pass' => ['username'],
    '_name' => 'profil'

Works perfectly, thanks Graziel