src/Backpack/Bootstrap/Routing.php
public function boot()
    {
        if ($this->app->getProps() === null) {
            return;
        }

        $routes = [];
        $pathPrefix = $this->app->getProp($this->routesPathPrefixPropName, '');
        $propRoutes = $this->app->getProp($this->routesPropName, []);

        if (!is_array($propRoutes)) {
            throw new \Exception('Routes definitions must be an array!');
        }

        foreach ($this->app->getProp($this->routesPropName, []) as $route) {
            $this->validate($route);
            $routes[] = $this->app->createRoute(
                $route['method'] ?? null,
                $pathPrefix.$route['path'],
                $route['stack']
            );
        }

        $this->app->stack($routes);
    }
public function boot()
    {
        if ($this->app->getProps() === null) {
            return;
        }

        $routes = [];
        $pathPrefix = $this->app->getProp($this->routesPathPrefixPropName, '');
        $propRoutes = $this->app->getProp($this->routesPropName, []);

        if (!is_array($propRoutes)) {
            throw new \Exception('Routes definitions must be an array!');
        }

        foreach ($this->app->getProp($this->routesPropName, []) as $route) {
            $this->validate($route);
            $routes[] = $this->app->createRoute(
                $route['method'] ?? null,
                $pathPrefix.$route['path'],
                $route['stack']
            );
        }

        $this->app->stack($routes);
    }
public function boot ( ) { if ( $ this -> app -> getProps ( ) === null ) { return ; } $ routes = [ ] ; $ pathPrefix = $ this -> app -> getProp ( $ this -> routesPathPrefixPropName , '' ) ; $ propRoutes = $ this -> app -> getProp ( $ this -> routesPropName , [ ] ) ; if ( ! is_array ( $ propRoutes ) ) { throw new \ Exception ( 'Routes definitions must be an array!' ) ; } foreach ( $ this -> app -> getProp ( $ this -> routesPropName , [ ] ) as $ route ) { $ this -> validate ( $ route ) ; $ routes [ ] = $ this -> app -> createRoute ( $ route [ 'method' ] ?? null , $ pathPrefix . $ route [ 'path' ] , $ route [ 'stack' ] ) ; } $ this -> app -> stack ( $ routes ) ; }
Look for routes to register in application properties
@throws \Exception
Look for routes to register in application properties