Welcome Guest, Not a member yet? Register   Sign In
Remove route from routes collection
#1

(This post was last modified: 06-23-2023, 04:12 AM by RWCH.)

Hi there,

Is there a way to remove a route in the routes collection? I understand that it normally should not be necessary to remove routes, because you specify them yourself.

But I use Shield and shield added routes to the routes collection which are (in my case) invalid.

Example:

route 'register' is invalid and it shouldn't be part of my routes. It has been replaced with my own route:

$routes->get('{locale}/Register', '\App\Controllers\Register::index', ['as' => 'register']); //The name should be equal to the name used in the Shield controllers

Anyone?
Reply
#2

> Is there a way to remove a route in the routes collection?

No.

Remove `service('auth')->routes($routes);` in app/Config/Routes.php.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB