|
|
@@ -42,11 +42,11 @@ class UserController extends Controller
|
|
|
if($request->has('owner_id')){
|
|
|
$owner_id= $request->input('owner_id');
|
|
|
$owner_ids = array_filter(preg_split('/[,, ]+/is',$owner_id));
|
|
|
- $ids=[];
|
|
|
- foreach ($owner_ids as $id)$ids[]='_'.$id;
|
|
|
- $query->whereHas('roles',function($query) use ($ids){
|
|
|
- $query->whereHas('authorities',function ($query)use($ids){
|
|
|
- $query->whereIn('name',$ids);
|
|
|
+ $ownerIds=[];
|
|
|
+ foreach ($owner_ids as $id)$ownerIds[]='_'.$id;
|
|
|
+ $query->whereHas('roles',function($query) use ($ownerIds){
|
|
|
+ $query->whereHas('authorities',function ($query)use($ownerIds){
|
|
|
+ $query->whereIn('name',$ownerIds);
|
|
|
});
|
|
|
});
|
|
|
}
|