Organization.php 348 B

123456789101112131415161718192021
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: zilongs
  5. * Date: 20-9-29
  6. * Time: 下午2:35
  7. */
  8. namespace App\Models;
  9. class Organization extends BaseModel
  10. {
  11. public function docter()
  12. {
  13. return $this->belongsToMany(Docter::class);
  14. }
  15. public function offices(){
  16. return $this->hasMany(Office::class,'org_id','id');
  17. }
  18. }