0

I have two controllers that I want to use as default so how I can pass them into routes file.

I have done it like this:

$route['default_controller'] = "user,home";

Can you please correct it.

4
  • How do two controllers work together to begin with...!? Commented Jan 8, 2016 at 10:52
  • 1
    You cannot use 2 controllers as default. There is no sense, since the default controller is a catch for all unprocessed URLs. Though you can define closure to setup custom route processing using special conditions. Commented Jan 8, 2016 at 10:53
  • if i merge the both controller in one file and then use that controller as default is it a good approach? Commented Jan 8, 2016 at 10:56
  • Ask yourself this: "I am typing URL of website. What should I see?" When you answer this one, you will get default controller. Commented Jan 8, 2016 at 17:59

1 Answer 1

1

you must seperate your controllers. there is no way to use 2 controller as default.i wish this little info save some time for you

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.