Welcome Guest, Not a member yet? Register   Sign In
Can someone check base_url() and base_url("param")
#8

(This post was last modified: 09-07-2020, 08:06 AM by InsiteFX.)

You do not need the base_url in route_to if you have defined a route for that controller.

Example:

PHP Code:
$routes->group('', ['namespace' => 'Insitefx\Admin\Controllers'], function($routes)
{
    $routes->get('dashboard''Dashboard::index', ['filter' => 'login']);
}); 

And to go to my dashboard:

PHP Code:
<li class="nav-item d-none d-sm-inline-block">
    <
a href="<?= route_to('dashboard');?>" class="nav-link">Dashboard</a>
</
li
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: Can someone check base_url() and base_url("param") - by InsiteFX - 09-07-2020, 08:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB