namespace PhalconRest\Models;
use Phalcon\Mvc\Model\Behavior\SoftDelete;
use Phalcon\Mvc\Collection as Collection;
class ModelBase extends Collection {
public function initialize() {
$softDelete = new SoftDelete([
'field' => 'is_deleted',
'value' => 1
]);
$this->addBehavior($softDelete);
}
}
Can you please suggest me how do I fix the below error.
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Phalcon\\Mvc\\Collection::addBehavior() must implement interface Phalcon\\Mvc\\Collection\\BehaviorInterface, instance of Phalcon\\Mvc\\Model\\Behavior\\SoftDelete given
Thanks