• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can someone check base_url() and base_url("param")

#8
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.