Welcome Guest, Not a member yet? Register   Sign In
How make one route
#1

$routes->get('owner', [Calendar::class, 'Index']);
$routes->get('owner/calendar', [Calendar::class, 'Index']);


same touters how make one?
Reply
#2

We can not do this as of now, because in RouteCollection class get function's first params will accept a string, therefore we can't send a bunch of URI parts as an array.
Learning Codeigniter 
Reply
#3

$routes->get('owner(?:\/calendar)?', [Calendar::class, 'Index']);
Reply
#4

(11-24-2022, 09:25 AM)iRedds Wrote: $routes->get('owner(?:\/calendar)?', [Calendar::class, 'Index']);

can i simplify? $routes->get('owner(/calendar)?', [Calendar::class, 'Index']);
Reply




Theme © iAndrew 2016 - Forum software by © MyBB