Skip to content

Commit

Permalink
Simplify route declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
HamedDarragi committed Mar 22, 2021
1 parent 06e3e17 commit 1491031
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Route/RouteList.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@

use Concrete\Core\Routing\RouteListInterface;
use Concrete\Core\Routing\Router;
use Xanweb\Foundation\Controller\JavascriptAssetDefaults;

class RouteList implements RouteListInterface
{
public function loadRoutes(Router $router): void
{
$router->buildGroup()
->setNamespace('Xanweb\Foundation\Controller')
->routes(function (Router $r) {
$r->get('/xw/js/defaults.js', 'JavascriptAssetDefaults::getJavascript');
});
$router->get('/xw/js/defaults.js', JavascriptAssetDefaults::class . '::getJavascript');
}
}

0 comments on commit 1491031

Please sign in to comment.