update filter column with relation
This commit is contained in:
@@ -133,6 +133,11 @@ class Datacenter extends Controller
|
||||
fn($d) =>
|
||||
'<a href="' . route('package.datacenter.edit', $d->id) . '" class="btn btn-primary btn-sm">Edit</a>'
|
||||
)
|
||||
->filterColumn('v_center.host', function ($query, $keyword) {
|
||||
$query->whereHas('vCenter', function ($q) use ($keyword) {
|
||||
$q->where('host', 'like', "%{$keyword}%");
|
||||
});
|
||||
})
|
||||
->make(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user