PHP Version
8.1
CodeIgniter4 Version
4.3.6
CodeIgniter4 Installation Method
Git
Which operating systems have you tested for this bug?
macOS
Which server did you use?
cli-server (PHP built-in webserver)
Database
n/a
What happened?
throw new \CodeIgniter\Router\Exceptions\RedirectException($route);
$route may be a named route, relative URI, or a complete URL.
https://codeigniter4.github.io/CodeIgniter4/general/errors.html#redirectexception
but a named route does not work.
Steps to Reproduce
$routes->get('foo/bar', 'Foo::bar', ['as' => 'route-name']);<?phpnamespaceApp\Controllers;
useCodeIgniter\Router\Exceptions\RedirectException;
class Home extends BaseController
{
publicfunctionindex()
{
thrownewRedirectException('route-name');
}
}Navigate to http://localhost:8080, you will be redirected to http://localhost:8080/route-name.
Expected Output
Redirected to http://localhost:8080/foo/bar
Anything else?
No response
PHP Version
8.1
CodeIgniter4 Version
4.3.6
CodeIgniter4 Installation Method
Git
Which operating systems have you tested for this bug?
macOS
Which server did you use?
cli-server (PHP built-in webserver)
Database
n/a
What happened?
but a named route does not work.
Steps to Reproduce
Navigate to http://localhost:8080, you will be redirected to
http://localhost:8080/route-name.Expected Output
Redirected to
http://localhost:8080/foo/barAnything else?
No response