leftJoin('position p', 'p.id = cl.position') ->where('cl.account_id', $accountId) // ->whereIn('cl.status', [self::COMMON_OFF, -1]) ->field('cl.*,p.name as position_name') ->order('cl.id', 'desc') ->find(); } public function account() { return $this->hasOne(Account::class, 'id', 'account_id'); } }