【发布时间】:2020-12-23 16:54:56
【问题描述】:
当前 select2_from_ajax 仅通过搜索 q 搜索词。如何将多个搜索信息传递给该方法?
我需要传递当前记录 ID /admin/product/4。
我需要按 product_id 4 和关键字进行 sql 过滤。我该怎么做?
CRUD::field('select2_from_ajax')
->type('select2_from_ajax')
->label("Article <small class='font-light'>(select2_from_ajax for a 1-n relationship)</small>")
->entity('article')
->attribute('title')
->model('Backpack\NewsCRUD\app\Models\Article')
->data_source(url('api/article'))
->placeholder('Select an article')
->minimum_input_length(2)
->wrapper(['class' => 'form-group col-md-6'])
->tab('Selects');
【问题讨论】: