change Controller for login routes

drand100 - 2 weeks ago

Hi, I need to change Controller for /login. Can I do that? I need to overwrite /login route with new login function from my controller from my module.

ryanthompson - 1 week ago

Hey there!

You simply need to override the named route:

To do so:

  1. Create a /resources/{APP_REF}/routes.php file
  2. Add the following route to it (note the same name)
Route::any('your-login-path', [
    'as'   => 'anomaly.module.users::login',
    'uses' => 'Anomaly\UsersModule\Http\Controller\[email protected]',