Efficiently\AuthorityController\ControllerAdditions::assignAfter PHP Method

assignAfter() protected method

Apply the applicable after filters to the route.
protected assignAfter ( Illuminate\Routing\Route $route, Illuminate\Http\Request $request, string $method ) : mixed
$route Illuminate\Routing\Route
$request Illuminate\Http\Request
$method string
return mixed
    protected function assignAfter($route, $request, $method)
    {
        foreach ($this->getAfterFilters() as $filter) {
            // If the filter applies, we will add it to the route, since it has already been
            // registered with the router 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));
            }
        }
    }