where(['status'=>1])->select(); } public function getSaleList(){ return (new StaffMember())->where(['status'=>1])->select(); } public function customerlevel() { return $this->belongsTo('Customerlevel', 'customerlevel_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function customertype() { return $this->belongsTo('Customertype', 'customertype_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function saler() { return $this->belongsTo('StaffMember', 'staff_member_id', 'id', [], 'LEFT')->setEagerlyType(0); } }