阶段更新

This commit is contained in:
2023-01-16 11:47:12 +08:00
parent 7ad0f6d03d
commit a680e8ff5e
13 changed files with 249 additions and 32 deletions

View File

@@ -2,6 +2,8 @@
namespace Modules\User\Models;
use App\Models\Area;
use App\Models\AreaClerk;
use App\Models\AreaCode;
use App\Traits\Macroable;
use App\Traits\OrderByIdDesc;
@@ -308,5 +310,13 @@ class User extends Authenticate
return sprintf("%s (%s)", $this->username, $this->info->nickname);
}
public function areas()
{
return $this->belongsToMany(
Area::class,
(new AreaClerk())->getTable())->using(AreaClerk::class
);
}
}