| 1234567891011121314151617181920212223 |
- <?php
- namespace App\Traits;
- use App\Database;
- /**
- * @property string $dts_deleted
- * @method bool commit()
- */
- trait SoftDeleteTrait {
- public function softDelete(): bool {
- $this->dts_deleted = Database::dts();
- return $this->commit();
- }
- public function restore(): bool {
- $this->dts_deleted = null;
- return $this->commit();
- }
- }
|