Welcome Guest, Not a member yet? Register   Sign In
Custom chaining in codeigniter4 model

(This post was last modified: 01-08-2022, 02:52 AM by RedWd.)

Hi everyone, like suggested in title i would like to do somethings like this:

PHP Code:

so, in my UserModel i must create this method WithCompanyInfo that refer to another table / model CompanyModel with external key "user_id".

PHP Code:
  public function WithCompanyInfo ()
    //somehow tell ci4 to make a join and retrieve companymodel info
    return $this;

How can be done that?


I've found how to manage that.

Theme © iAndrew 2016 - Forum software by © MyBB