Update afterDelete(&$model) { to  afterDelete(Model $model)