Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use another model in current model using cakephp?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 604
    Comment on it

    Hi If you want a condition where you can load another model inside you model. you can do as I code, see the example below

    App::import('Model', 'MyModel'); $my_model = new MyModel();
    

    Or you can write

     $this->SomeModel->MyModel;
    

    if you have already this model associated in current model. Tags

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: