/BEAR.AuraRouterModule

An aura router module for BEAR.Sunday

Primary LanguagePHP

BEAR.AuraRouterModule

This is the Aura Router (v2) Module for BEAR.Sunday.

Installation

Composer install

composer require bear/aura-router-module

Module install

use Ray\Di\AbstractModule;
use BEAR\Package\Provide\Router\AuraRouterModule;

class AppModule extends AbstractModule
{
    protected function configure()
    {
        $this->install(new AuraRouterModule);
    }
}

Router config

place router script file at var/conf/aura.route.php.

<?php
/** @var $router \Aura\Router\RouteCollection */

$router->add('/weekday', '/weekday/{year}/{month}/{day}')->addValues(['path' => '/weekday']);