I am new to CI4
My Ci4 installed with this
Code:
public $baseURL = 'http://localhost/ci4/';
When I try to redirect
Code:
return redirect()->route("admin/category");
It redirects to :
Code:
http://localhost/admin/category
instead of
Code:
http://localhost/ci4/admin/category
My workaround is to comment this line on route() method on RedirectResponse class
Code:
//$route = $routes->reverseRoute($route, ...$params);
Because this line adding slashes in front of route, make the route becomes
makes base_url("/admin/category") returning
Code:
http://localhost/admin/category
But it returns the right uri when calling base_url with this (without slash in front of the route)
Code:
base_url("admin/category");
I don't know if it is safe for me to comment that line.
Or am I doing something wrong?