change Controller for login routes
Created 7 years ago by drand100

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  —  7 years 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\LoginController@login',