Laravel Nova: Bypass the search with Scout

人盡茶涼 提交于 2021-01-29 02:40:31

问题


How to disable searching for a resource with Scout without removing the Searchable trait from the resource model?

I want to deliberately bypass the Scout search inside Nova.


回答1:


Add this to your Nova Resource

public static function usesScout()
{
    return false;
}


来源:https://stackoverflow.com/questions/53061448/laravel-nova-bypass-the-search-with-scout

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