ajax - Voyager dropdown relationship ajax call
问题描述
How i can override model query which populate a belongsto relationship dropdown via ajax call. Tha call is like http://santinisacri.local/admin/santini-soggetti/relation?type=santini_soggetti_hasone_santini_soggetti_relationship&method=add&page=1 and the response is a JSON. I want to add a where clausole. I have tried in model but nothing. I need to create a new controller?
解决方案
我通过一个覆盖控制器解决并返回一个数组,如:
$results['results'] = $soggetti;
return $results;
推荐阅读
- python - 无法从 pip 或 conda 安装 pyarrow
- python - 如何在python中的特定时间每天运行一个函数?
- javascript - 更新功能失败,创建和删除工作
- python - 如何使用步骤对多维 numpy 数组进行子集化?
- azure-active-directory - PowerBI 访问安全的 rest api
- python - (Python:不和谐)错误:无法为使用 PEP 517 且无法直接安装的 multidict、yarl 构建轮子
- microsoft-edge - 没有插件或开发工具的 Microsoft Edge 用户代理覆盖
- heroku - 即使应用程序正在运行,Heroku 部署也会失败
- c++ - 放大的 OpenCV 图像
- powershell - 即使设置为 SilentlyContinue,PowerShell Remove-Item 也会返回错误