This plugins has been developped for cakephp 3.x.
You can install this plugin into your CakePHP application using composer.
Update your composer file to include this plugin:
composer require oxenti/soft-delete
- Load the plugin:
// In /config/bootstrap.php
Plugin::load('SoftDelete');
- Make a model soft deleteable by using SoftDelete trait:
// in src/Model/Table/UsersTable.php
...
use SoftDelete\Model\Table\SoftDeleteTrait;
class UsersTable extends Table
{
use SoftDeleteTrait;
...