PHPackages                             slicesofcake/delete - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. slicesofcake/delete

AbandonedArchivedCakephp-plugin[Database &amp; ORM](/categories/database)

slicesofcake/delete
===================

CakePHP plugin for soft deleting

2.1(5y ago)0198[1 issues](https://github.com/slicesofcake/delete/issues)MITPHP

Since Jan 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/slicesofcake/delete)[ Packagist](https://packagist.org/packages/slicesofcake/delete)[ RSS](/packages/slicesofcake-delete/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

CakePHP plugin for soft deleting
================================

[](#cakephp-plugin-for-soft-deleting)

[![Build Status](https://camo.githubusercontent.com/47fddd8193144cb07924a0f173abc02ffbc919cb7a21c1c413cad9688104b118/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736c696365736f6663616b652f64656c6574652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/slicesofcake/delete/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/bb99a0bb424379ca81eca8e97b7c8fd70ba0aff0bb3b1c5db5acda67374332a8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736c696365736f6663616b652f64656c6574652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/slicesofcake/delete/?branch=master)[![LICENSE](https://camo.githubusercontent.com/ad2c0c059c3ac1a7a267b2f57d7c6e7e605556d68c8df5b0f9f4667e7c1d052c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f736c696365736f6663616b652f64656c6574652e737667)](https://github.com/slicesofcake/delete/blob/master/LICENSE)[![Releases](https://camo.githubusercontent.com/5f2a0f8480a1ccd37558d02b394f1ce78502771e661b8a1ded334680a6c782c5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f736c696365736f6663616b652f64656c6574652e737667)](https://github.com/slicesofcake/delete/releases)

This Delete plugin enable soft deletable. Entities aren't removed from your database. Instead, a deleted timestamp is set on the record.

Requirements
------------

[](#requirements)

It is developed for CakePHP 4.x.

Installation
------------

[](#installation)

You can install plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
composer require slicesofcake/delete

```

Load the Behavior
-----------------

[](#load-the-behavior)

Load the Behavior in your src/Model/Table/YourTable.php (or if you have AppTable.php). The default field named in database table should be `deleted` (like `created` or `modified`) and compatible type with `Time::now()` (eg. `DATE` or `DATETIME`).

```
public function initialize(array $config)
{
    parent::initialize($config);

    $this->addBehavior('SlicesCake/Delete.Deleted');
}

```

You can configuration to customize the Delete plugin:

```
$this->addBehavior('SlicesCake/Delete.Deleted', [
    'field' => 'deleted_at', // Change column field name
]);

```

Add column by Migrations plugin
-------------------------------

[](#add-column-by-migrations-plugin)

1. Load Migrations plugin ().
2. Copy file from /vendor/slicesofcake/delete/config/20200101122906\_AddDeletedToProducts.example.php to your app main config directory.
3. Rename to 20200101122906\_AddDeletedTo\[YourTable\].php.
4. Edit file and rename class with changes above.
5. Update `change` method to set table name.
6. Run migrations by command: `cake migrations migrate`

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 98.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~213 days

Total

5

Last Release

2189d ago

Major Versions

1.0.2 → 2.02020-02-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c20760f298eae29425dd1c6180f208aedd70750a1bf2ecc350956a1587d6b4c?d=identicon)[kicaj](/maintainers/kicaj)

---

Top Contributors

[![kicaj](https://avatars.githubusercontent.com/u/3750725?v=4)](https://github.com/kicaj "kicaj (58 commits)")[![stickler-ci](https://avatars.githubusercontent.com/u/16011037?v=4)](https://github.com/stickler-ci "stickler-ci (1 commits)")

---

Tags

cakephpcakephp-pluginsoft-delete

### Embed Badge

![Health badge](/badges/slicesofcake-delete/health.svg)

```
[![Health](https://phpackages.com/badges/slicesofcake-delete/health.svg)](https://phpackages.com/packages/slicesofcake-delete)
```

###  Alternatives

[dereuromark/cakephp-databaselog

A CakePHP plugin for storing and viewing application logs in the database

44165.0k2](/packages/dereuromark-cakephp-databaselog)[pgbi/cakephp3-soft-delete

SoftDelete plugin for CakePHP

87291.9k](/packages/pgbi-cakephp3-soft-delete)[liqueurdetoile/cakephp-orm-json

Cakephp plugin to provide easy control over JSON type fields in database

1461.1k](/packages/liqueurdetoile-cakephp-orm-json)[snelg/cakephp-3-oracle

Oracle datasource for CakePHP 3

111.5k](/packages/snelg-cakephp-3-oracle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
