src/Common/Controller/Base.php
protected function generateRoutes()
    {
        if (defined('NAILS_STARTUP_GENERATE_APP_ROUTES') && NAILS_STARTUP_GENERATE_APP_ROUTES) {
            $oRoutesService = Factory::service('Routes');
            if (!$oRoutesService->update()) {
                throw new NailsException('Failed to generate routes_app.php. ' . $oRoutesService->lastError(), 500);
            } else {
                $oInput = Factory::service('Input');
                redirect($oInput->server('REQUEST_URI'), 'auto', 307);
            }
        }
    }
protected function generateRoutes()
    {
        if (defined('NAILS_STARTUP_GENERATE_APP_ROUTES') && NAILS_STARTUP_GENERATE_APP_ROUTES) {
            $oRoutesService = Factory::service('Routes');
            if (!$oRoutesService->update()) {
                throw new NailsException('Failed to generate routes_app.php. ' . $oRoutesService->lastError(), 500);
            } else {
                $oInput = Factory::service('Input');
                redirect($oInput->server('REQUEST_URI'), 'auto', 307);
            }
        }
    }
protected function generateRoutes ( ) { if ( defined ( 'NAILS_STARTUP_GENERATE_APP_ROUTES' ) && NAILS_STARTUP_GENERATE_APP_ROUTES ) { $ oRoutesService = Factory :: service ( 'Routes' ) ; if ( ! $ oRoutesService -> update ( ) ) { throw new NailsException ( 'Failed to generate routes_app.php. ' . $ oRoutesService -> lastError ( ) , 500 ) ; } else { $ oInput = Factory :: service ( 'Input' ) ; redirect ( $ oInput -> server ( 'REQUEST_URI' ) , 'auto' , 307 ) ; } } }
Checks if routes need to be generated as part of the startup request

@throws NailsException
@throws \Nails\Common\Exception\FactoryException
Checks if routes need to be generated as part of the startup request