PHP code example of rahulabs / yii2-softdelete
1. Go to this page and download the library: Download rahulabs/yii2-softdelete library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rahulabs / yii2-softdelete example snippets
use rahulabs\softdelete\behaviors\SoftDeleteBehavior;
use rahulabs\softdelete\SoftDelete;
class Model extends \yii\db\ActiveRecord
{
use SoftDelete;
public function behaviors()
{
return [
'class' => SoftDeleteBehavior::className(),
];
}
}