Skip to content
This repository was archived by the owner on Jun 5, 2022. It is now read-only.

Commit 4c64b5f

Browse files
authored
Uprava funkce delete
1 parent cf71949 commit 4c64b5f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/BaseTable.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,15 @@ public function update($data)
169169
return $item;
170170
}
171171

172+
/**
173+
* @param $id
174+
* @return int
175+
*/
172176
public function delete($id)
173177
{
174-
return $this->getTable()->get($id)->delete();
178+
return $this->findAll()
179+
->where('id = ?', $id)
180+
->delete();
175181
}
176182

177183
public function rowExist($column, $value, $id = NULL)

0 commit comments

Comments
 (0)