Argument 1 passed to App\Model\Table\WorkflowTable::beforeSave() must be an instance of App\Model\Table\EventInterface, instance of Cake\Event\Event given, called in C:\xampp\htdocs\daily-report\vendor\cakephp\cakephp\src\Event\EventManager.php on line 309
use宣言で直る
use ArrayObject;
use Cake\Datasource\EntityInterface;
use Cake\Event\EventInterface;
beforeSaveの使い方
class WorkflowTable extends Table {
~
~
public function beforeSave(EventInterface $event, EntityInterface $entity, ArrayObject $options)
{
if ($entity->is_deleted == '') {
$entity->is_deleted = null;
}
}