![]() |
Route with http verb - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Route with http verb (/showthread.php?tid=77734) |
Route with http verb - 68thorby68 - 10-13-2020 Hi, This may have been answered, but as the forum search is not working I need to ask. I am trying to redirect to a page with parameters, but not sure how to configure the redirect, the route or even if the route is necessary. Essentially I am trying to replicate the following http://mydomain/mypage/mymethod?weekending='something' in the redirect, i.e. PHP Code: return redirect()->route('named_route/weekending/25-10-2020'); And assuming my route would look something like PHP Code: $routes->post('named_route/varName/varValue', 'myPage::myMethod/parameters'); which would interact with my controller PHP Code: class myPage extends BaseController { RE: Route with http verb - 68thorby68 - 10-14-2020 Hi, I recently posted for help with redirect and routing (https://forum.codeigniter.com/thread-77734.html). Unfortunately it does not seem possible to configure a redirect with parameters that points to a route that interprets the parameters i.e. PHP Code: redirect()->route('named_route/weekending/25-10-2020'); PHP Code: redirect()->route('named_route?weekending=25-10-2020'); PHP Code: redirect()->to('named_route?weekending=25-10-2020'); i.e PHP Code: $routes->get('named_route/varName/varValue', 'myPage::myMethod/parameters'); PHP Code: $sessUpdate = [ |