belongsTo(Docter::class); } public function ondocter() { return $this->hasOne(Docter::class,'id','docter_id'); } public function docterorganization() { return $this->hasMany(DocterOrganization::class,'docter_id','docter_id'); } public function organization() { return $this->belongsToMany('App\Models\Organization','docter_organization','docter_id','id'); } // private static $_post_type =[ // 1 => '图文', // 2 => '电话', // 3 => '问诊' // ]; // private static $_post_status =[ // 1 => '审核', // 2 => '通过', // 3 => '未通过' // ]; }