How to connect multiple URLs to a single controller with fuelphp

Asked 1 years ago, Updated 1 years ago, 121 views

test/codemaseter
test/codemaseter/
test/codemaseter/dept/*

test/codemaseterAll URL patterns that come below
as shown in
I'd like to consolidate it into one controller, but is it possible to do so?

The above three are examples of id=xxx12313, and there is a pattern in which an indefinite string comes in the get param, so would it be possible to allow all of the following to access one of the controllers?

I thought it would be okay to use the following description, but I'm afraid I can't use it because I'm not sure if the / below / is correct and I don't know what :any means.

'test/codemaseter(/:any)'=>array(array('GET', new Router::get('programming/test'))))

php fuelphp

2022-09-30 21:23

1 Answers

You can use router, but you can also use htaccess to control it.


2022-09-30 21:23

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.