$filter->is('pid', '物業公司')->select(Property::all()->pluck('name', 'id'))->load('gid', '/admin/getDepartment');
$filter->is('gid', '部門')->select(PropertyDepartment::all()->pluck('name', 'id'));
/*
* 根據物業公司的id,獲取公司的部門信息
*/
public function getDepartment(Request $request){
$pid = $request->get('q');
return PropertyDepartment::where('pid','=', $pid)->get(['id', DB::raw('name as text')]);
}