Example #1
0
 /**
  * @param Router $router
  *
  * @return mixed
  */
 public function loadRoutes(Router $router)
 {
     $binders = $this->config->get($this->app->getContext() . '.routes', []);
     foreach ($binders as $binder) {
         if (!class_exists($binder)) {
             throw new InvalidArgumentException('RouteBinder [' . $binder . '] does not exist');
         }
         $this->container->make($binder)->bind($router);
     }
 }