diff --git a/src/Repositories/BaseRepository.php b/src/Repositories/BaseRepository.php index b47e140..85c3a97 100644 --- a/src/Repositories/BaseRepository.php +++ b/src/Repositories/BaseRepository.php @@ -226,7 +226,7 @@ public function doesntExistWhere(array $where): bool * @param int $id 主键id * @return mixed */ - public function getByPkId(int $id) + public function getInfoById(int $id) { return $this->model->find($id); } diff --git a/src/Repositories/Interfaces/BaseInterface.php b/src/Repositories/Interfaces/BaseInterface.php index 58e7080..3e5921e 100644 --- a/src/Repositories/Interfaces/BaseInterface.php +++ b/src/Repositories/Interfaces/BaseInterface.php @@ -102,7 +102,7 @@ public function doesntExistWhere(array $where): bool; * @param int $id 主键id * @return mixed */ - public function getByPkId(int $id); + public function getInfoById(int $id); /** * 根据条件,获取一条指定字段数据