Skip to content

redirect route when route is more complex #2937

Description

@crustamet

Hello i am trying to redirect to a reversed route specified in my routes like this and i get this error.
SYSTEMPATH/HTTP/Exceptions/HTTPException.php at line 146

Here is my routes


$routes->group('cms/banners', ['namespace' => 'App\Controllers\cms'], function($routes)
{
	$routes->get('/', 'banners::index');
	$routes->get('add', 'banners::add');
	$routes->get('edit/(:num)', 'banners::edit/$1');
	$routes->post('add', 'banners::submit_add');
});

And here is my code inside my controller
return redirect()->route('cms/banners/edit/'.$id_item);

When i submit the form i want to go to the edit page of the item.
It does not work.

When i go to the edit page of the item manually

https://example.com/cms/banners/edit/36
it works perfectly, the Route is working correctly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions