Welcome Guest, Not a member yet? Register   Sign In
route_to not working with controller::method
#1

hi

why route_to method doesn't work with the controller::method when setAutoRoute is set to true and there is no route defined in the Routes.php


<?php echo route_to('App\Controllers\Home::TestFunction')?>
<?php echo route_to('Home::TestFunction')?>

Doesn't work.

Is this not supported? do i have to define the Route in Routes.php to use route_to function.
It would be a nice feature to have another function if not route_to which auto detect the Controller and functions without any route in Routes.php.

This works
<?php echo site_url('home/TestFunction'); ?>
Reply


Messages In This Thread
route_to not working with controller::method - by eafarooqi - 03-05-2020, 07:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB