Welcome Guest, Not a member yet? Register   Sign In
How do i redirect user to "home" controller after successfully loggin?
#4

Per the userguide:

Quote:Reverse routing allows you to define the controller and method, as well as any parameters, that a link should go to, and have the router lookup the current route to it.

So in your redirect call you have to give it the controller and method to go to, not the URI.

Code:
return redirect('App\Controllers\Home::index');

Alternatively, if you had "named" your route, you could provide the route's name instead.

Code:
$routes->get('home', 'Home::index', ['as' => 'home']);

return redirect('home');
Reply


Messages In This Thread
RE: How do i redirect user to "home" controller after successfully loggin? - by kilishan - 01-24-2019, 07:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB