App\Source\RouteSystem\AdminRouteCollection::register PHP Method

register() public static method

public static register ( Slim\App $app )
$app Slim\App
    public static function register(\Slim\App $app)
    {
        foreach (self::getAll() as $resource) {
            $resource->registerRoute($app);
        }
    }

Usage Example

Example #1
0
 public function afterInitialization()
 {
     parent::afterInitialization();
     $this->adminPanelMenuRegister();
     $this->container->dispatcher->addListener('app.beforeRun', function ($event) {
         $event->getApp()->group('/admin', function () {
             AdminRouteCollection::register($this);
         })->add(new AuthMiddleware());
     }, -980);
 }