Total Complexity | 2 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 50% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
4 | trait SoftDeleteTrait |
||
5 | { |
||
6 | protected $softDeleteField = 'is_deleted'; |
||
7 | |||
8 | protected $softDeleteValue = 1; |
||
9 | |||
10 | public function softDelete() |
||
11 | { |
||
12 | return $this->updateAttributes([ |
||
|
|||
13 | $this->softDeleteField => $this->softDeleteValue, |
||
14 | ]); |
||
15 | } |
||
16 | |||
17 | /** |
||
18 | * @return bool |
||
19 | */ |
||
20 | 1 | public function isDeleted(): bool |
|
24 | } |
||
25 | } |
||
26 |