简体   繁体   English

Laravel Backpack select2_from_ajax_multiple支持添加新记录

[英]Laravel Backpack select2_from_ajax_multiple with support to add new records

Is there an easy way to use select2_from_ajax_multiple or similar nn relation field in Laravel Backpack which will support also creating new records if they do not exist? 是否有一种简单的方法可以在Laravel Backpack使用select2_from_ajax_multiple或类似的nn关系字段,如果不存在,它们还支持创建新记录?

What I am trying to achieve is tags functionality, but without the need to go to the other model to define new tags and so on. 我试图实现的是tags功能,但无需转到其他模型来定义新标签等。

There's no such functionality built-in, no. 没有内置的功能,没有。 There's a long talk about why a general solution is more complicated than it seems. 关于通用解决方案为何比看起来复杂得多的话题,很长的讨论 It's a feature that Backpack most certainly will have, but it will probably be in Backpack 4, not the current one. 这是背包最肯定会具备的功能,但可能会出现在背包4中,而不是当前的背包中。

I'm afraid you're going to have to create a custom field type starting from select2_from_ajax_multiple if you want this functionality now. 如果您现在想要此功能,恐怕您将不得不从select2_from_ajax_multiple开始创建自定义字段类型

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM