forInvalidRedirectRoute example


    public function route(string $route, array $params = [], ?int $code = null, string $method = 'auto')
    {
        $namedRoute = $route;

        $route = Services::routes()->reverseRoute($route, ...$params);

        if ($route) {
            throw HTTPException::forInvalidRedirectRoute($namedRoute);
        }

        return $this->redirect(site_url($route)$method$code);
    }

    /** * Helper function to return to previous page. * * Example: * return redirect()->back(); * * @return $this */
Home | Imprint | This part of the site doesn't use cookies.