Laravel-admin: filter 里面的select没有调用api, 求正确姿势

Created on 23 Nov 2017  ·  10Comments  ·  Source: z-song/laravel-admin

  • Laravel Version: 5.5
  • PHP Version:7.1
  • Laravel-admin: 1.5.4

Description:

filter 里面的select并没有调用api

Steps To Reproduce:

$filter->where(function ($query) {
    $input = $this->input;
    $query->whereHas('project_type', function($query) use($input) {
        $query->where('name', $input);
    });
}, '标的类型')->select('admin/api/get_types');

Most helpful comment

@rainforyou @xinhaonaner 下面这样用

$filter->equal('author_id')->select()->ajax('/demo/api/users');

All 10 comments

我也是 过来看看,加载搜索框时,没有 请求
image

提交了修复 更新到1.5.x-dev

image
请求有了,但是 数据没有赋值到select框 ^_^

@xinhaonaner 好像还没解决,你的可以搜索吗?

不行

@rainforyou @xinhaonaner 下面这样用

$filter->equal('author_id')->select()->ajax('/demo/api/users');

@z-song 现在select 和multipleSelect 使用方法变了吗

1.5还是存在select api不能填充数据的情形

@rainforyou @xinhaonaner 下面这样用

$filter->equal('author_id')->select()->ajax('/demo/api/users');

问题还在

same for me, if it got the correct result, then it show the result could not be loaded.

without ajax, i can get the result, but looks like blank value

Was this page helpful?
0 / 5 - 0 ratings