Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Fuel and customer specific classes
  • I have code that I need to vary for different customers.

    Instead of managing separate app copies, or using symlinks, I'd like to have a special directory (with or without subfolders) where to keep the customized controller and models, and if the class is not found there, to use the "standard" class code.

    Any suggestions? I believe there are several ways to achieve this, but is there an existing out-of-box solution?

    I'm looking for the solution that would need a minimum of class name fiddling.

  • HarroHarro
    Accepted Answer
    You could use a module per customer. and based on the customer load the corresponding module?

    You can include routes in the module, so that the URL's for the users are all the same, and transparently mapped to the correct controller, like

    'some/function' => 'moduleABC/some/function'

    in moduleABC, and in moduleDEF:

    'some/function' => 'moduleDEF/some/function'

    the user will always see and use (if you generate your url's correctly).
  • Thanks, this sounds great.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion