src/WordPress/Plugin.php
protected function registerRestRouter()
  {
    $this->singleton('FatPanda\Illuminate\WordPress\Http\Router', function() {
      // create the router
      $router = new Router($this);
      $router->setNamespace($this->getRestNamespace());
      $router->setVersion($this->getRestVersion());
      $router->setControllerClasspath($this->getNamespaceName() . '\\Http\\Controllers');
      // load the routes
      $plugin = $this;
      require $this->basePath('src/routes.php');
      
      return $router;
    });
  }
protected function registerRestRouter()
  {
    $this->singleton('FatPanda\Illuminate\WordPress\Http\Router', function() {
      // create the router
      $router = new Router($this);
      $router->setNamespace($this->getRestNamespace());
      $router->setVersion($this->getRestVersion());
      $router->setControllerClasspath($this->getNamespaceName() . '\\Http\\Controllers');
      // load the routes
      $plugin = $this;
      require $this->basePath('src/routes.php');
      
      return $router;
    });
  }
protected function registerRestRouter ( ) { $ this -> singleton ( 'FatPanda\Illuminate\WordPress\Http\Router' , function ( ) { // create the router $ router = new Router ( $ this ) ; $ router -> setNamespace ( $ this -> getRestNamespace ( ) ) ; $ router -> setVersion ( $ this -> getRestVersion ( ) ) ; $ router -> setControllerClasspath ( $ this -> getNamespaceName ( ) . '\\Http\\Controllers' ) ; // load the routes $ plugin = $ this ; require $ this -> basePath ( 'src/routes.php' ) ; return $ router ; } ) ; }
Create router instance and load routes
Create router instance and load routes