CodeIgniter Forums

Full Version: addRedirect not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The "addRedirect" function does not work properly

$routes->add('users/profile', 'Users::profile', ['as' => 'profile']);

// Redirect to a named route
$routes->addRedirect('users/about', 'profile');
// Redirect to a URI
$routes->addRedirect('users/about', 'users/profile');

and it gives ErrorException Undefined offset: 1

Is there any solution to solve that issue?