Welcome Guest, Not a member yet? Register   Sign In
myth-auth How not to load the default routes
#1

Hi everyone, I am using myth for authentication in a study application. In the file "vendor\myth\auth\src\Config\Routes.php" 

PHP Code:
<?php

/*
 * Myth:Auth routes file.
 */
$routes->group('', ['namespace' => 'Myth\Auth\Controllers'], function ($routes) {
    // Login/out
    $routes->get('login''AuthController::login', ['as' => 'login']);
    $routes->post('login''AuthController::attemptLogin');
    $routes->get('logout''AuthController::logout');

    // Registration
    $routes->get('register''AuthController::register', ['as' => 'register']);
    $routes->post('register''AuthController::attemptRegister');

    // Activation
    $routes->get('activate-account''AuthController::activateAccount', ['as' => 'activate-account']);
    $routes->get('resend-activate-account''AuthController::resendActivateAccount', ['as' => 'resend-activate-account']);

    // Forgot/Resets
    $routes->get('forgot''AuthController::forgotPassword', ['as' => 'forgot']);
    $routes->post('forgot''AuthController::attemptForgot');
    $routes->get('reset-password''AuthController::resetPassword', ['as' => 'reset-password']);
    $routes->post('reset-password''AuthController::attemptReset');
}); 


I just wanted to use the login route, however if I make changes to this file in a future change my changes would be overwritten.

Any way to do this?

Thank you all!
Reply


Messages In This Thread
myth-auth How not to load the default routes - by rafinhaa - 06-09-2021, 10:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB