crud filter for countries test
This commit is contained in:
parent
90ffd44acc
commit
a5cde5a7f8
|
|
@ -74,8 +74,8 @@ public function setup()
|
|||
], function() {
|
||||
return Country::all()->pluck('name', 'id')->toArray();
|
||||
}, function($values) {
|
||||
$values = is_array($values)?$values:array($values);
|
||||
foreach ($values as $key => $value) {
|
||||
//$values = is_array($values)?$values:array($values);
|
||||
foreach (json_decode($values) as $key => $value) {
|
||||
$this->crud->query = $this->crud->query->whereHas('countries', function ($query) use ($value) {
|
||||
$query->where('country_id', $value);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue