/** * Apply the applicable after filters to the route. * * @param \Nova\Routing\Controller $instance * @param \Nova\Routing\Route $route * @param \Nova\Http\Request $request * @param string $method * @return mixed */ protected function assignAfter($instance, $route, $request, $method) { foreach ($instance->getAfterFilters() as $filter) { // If the filter applies, we will add it to the route, since it has already been // registered on the filterer by the controller, and will just let the normal // router take care of calling these filters so we do not duplicate logics. if ($this->filterApplies($filter, $request, $method)) { $route->after($this->getAssignableAfter($filter)); } } }
/** * 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); }
/** * Apply the applicable after filters to the route. * * @param \Nova\Routing\Controller $instance * @param \Nova\Routing\Route $route * @param \Nova\Http\Request $request * @param string $method * @return mixed */ protected function assignAfter($instance, $route, $request, $method) { foreach ($instance->getAfterFilters() as $filter) { if ($this->filterApplies($filter, $request, $method)) { $route->after($this->getAssignableAfter($filter)); } } }