CodeIgniter Forums
addRedirect not working - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: addRedirect not working (/thread-74503.html)



addRedirect not working - BigBasha - 10-03-2019

The "addRedirect" function does not work properly

Code:
$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?