belongsTo('App\Models\User', 'user_id'); } public function project() { return $this->belongsTo('App\Models\Project', 'project_id'); } public function project_role() { return $this->belongsTo('App\Models\ProjectRole', 'project_role_id'); } public function getActive($type) { if($type == 'label') { return $this['active'] == 1 ? '通过' : '待审核'; } return $this['active']; } }