vegas-cmf/database-router

This package is abandoned and no longer maintained. No replacement package was suggested.

Vegas CMF Database router

dev-master 2017-05-17 11:31 UTC

This package is not auto-updated.

Last update: 2022-08-12 09:41:10 UTC


README

INSTALL AT A NEW PROJECT

  • use Vegas\Mvc\Router\Adapter\Mongo adapter in Bootstrap::initRoutes
  • register databaseRouteManager service
  • add route config in Module
return [
    'routes' => [
        'route_name' => [
            'module'     => 'ModuleName',
            'controller' => 'Frontend\ControllerName',
            'action'     => 'index',
        ],
    ]
];
  • create new route
$routeManager = $this->getDI()->get('databaseRouteManager');
$routeManager->update('route_name', PAGE_OBJECT_ID, /URL);

TEST OLD-SCHOOL

cp ./tests/config.php.sample ./tests/config.php
composer install
php ./vendor/bin/phpunit -c tests/phpunit.xml

TEST DOCKER

cp ./tests/config.php.sample ./tests/config.php
yake composer install
yake up
yake phpunit -c tests/phpunit.xml