Hi everyone, like suggested in title i would like to do somethings like this:
PHP Code:
$UserModel->Where('age','18')->WithCompanyInfo()->findAll();
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?
thanks
UPDATE
I've found how to manage that.