feat : site

This commit is contained in:
2025-02-27 17:34:32 +08:00
parent 3be21ed1b6
commit 66f3f4167f
4 changed files with 26 additions and 3 deletions

View File

@@ -48,6 +48,16 @@ class UserSite extends Model
return $this->find($id);
}
/**
* @param int $userId
* @param int $siteId
* @return Collection
*/
public function getInfoByUserIdAndSiteId(int $userId, int $siteId): Collection
{
return $this->where('user_id', $userId)->where('site_id', $siteId)->first();
}
/**
* @param int $userId
* @return array