Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Relation: module model to module model
  • Hi,
    I'm creating application with multiple modules and i came to a problem.

    I'm creating relation from one module to another and i need to edit models in both modules. But i want to have independent modules.
    My question: is there any solution to create such relation in which i create model in module A with defined relation  to model in module B and model  in module B with no defined relation to model in module A ?

    Or should i use other approach.
  • HarroHarro
    Accepted Answer
    In either case you have to make sure both modules are loaded.

    Then there are three options:
    - you relate Model_A in A directly to "B\Model_B"
    - you create a Model_B in A, and have that extend \B\Model\B, and keep the relation in the module
    - you duplicate Model_B in A so you have no cross-module relations
  • Thanks for reply, i think i will use your third option

Howdy, Stranger!

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

In this Discussion