Why the deleted data still appear in the interface?

大憨熊 提交于 2019-11-29 18:08:16

I see you are also using the rinvex repository. I don't see your code about fetch data. I assume you are fetching data from the repository cache. In your repository, your delete function.

public function delete($id){
    return $this->delete($id);
}

this should clear the repository cache. if you would like clear the cache of the repository manually, try the following in your repository method.

$this->forgetCache();

or

$this->getContainer('events')->fire($this->getRepositoryId() . '.entity.updated', [$this, $modelInstance]);

actually forgetCache() method shall do, I'm using it in my repository after I made mass update to my table.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!