Skip to content

Commit 65e0396

Browse files
authored
Add UpdateWhere
1 parent 1ad9ba0 commit 65e0396

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/AbstractRepository.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,10 @@ public function toggle($id,$column){
125125
public function findByArray(array $conditions){
126126
return $this->getModel()->where($conditions)->first();
127127
}
128+
129+
public function updateWhere($data, $column, $value, $relations=[])
130+
{
131+
return $this->getModel()->with($relations)->where($column, $value)->update($data);
132+
}
128133

129134
}

0 commit comments

Comments
 (0)