Devise\Pages\RoutesGenerator::cacheRoutes PHP Method

cacheRoutes() public method

Uses the routes array and spits out a string of laravel routes
public cacheRoutes ( ) : string
return string
    public function cacheRoutes()
    {
        // routes are not enabled, so we should not
        // cache. furthermore we should disable the
        // laravel cache and clear the devise routes
        // file if it exists
        if (!$this->Config->get('devise.routes.enabled')) {
            $this->clearLaravelCache();
            $this->clearDeviseRoutes();
            return false;
        }
        $routeCachePath = $this->Config->get('devise.routes.cache');
        $routes = $this->findDvsPageRoutes();
        $routesAsString = $this->View->make('devise::layouts.routes', ['routes' => $routes])->render();
        $this->File->put($routeCachePath, $routesAsString);
        $this->Artisan->call('route:cache');
        return true;
    }