Example #1
0
 /**
  * Get an instance of the possible current controller
  * being executed for the current route.
  *
  * @return mixed
  */
 protected function getCurrentController()
 {
     $router = $this->app->make('router');
     $route = $router->currentRouteAction();
     if (($pos = strpos($route, '@')) !== false) {
         Controller::setFilterer($router);
         $controllerName = substr($route, 0, $pos);
         return $this->app[$controllerName];
     }
 }
 /**
  * Make a controller instance via the IoC container.
  *
  * @param  string  $controller
  * @return mixed
  */
 protected function makeController($controller)
 {
     Controller::setFilterer($this->filterer);
     return $this->container->make($controller)->setContainer($this->container);
 }