public function register()
{
$this->app->singleton(['xe.router' => RouteRepository::class], function ($app) {
$repo = new DatabaseRouteRepository($app['config'], InstanceRoute::class);
if (env('APP_DEBUG') != true) {
$repo = new CacheDecorator($repo, new LaravelCache($app['cache.store']));
}
return new MemoryDecorator($repo);
});
$this->setNewRouteValidator();
$this->registerMacro($this->app['router']);
$this->registerRouteCollection($this->app['router']);
}