Skip to content

Commit f3517ec

Browse files
committed
改进软删除
1 parent 01fd9b6 commit f3517ec

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/model/concern/SoftDelete.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,15 @@
2727
*/
2828
trait SoftDelete
2929
{
30-
public function getQuery(): Query
30+
/**
31+
* 获取查询对象
32+
*
33+
* @param array|null $scope 设置不使用的全局查询范围
34+
* @return Query
35+
*/
36+
public function getQuery(array | null $scope = []): Query
3137
{
32-
$query = parent::getQuery();
38+
$query = parent::getQuery($scope);
3339
$this->withNoTrashed($query);
3440

3541
return $query;

0 commit comments

Comments
 (0)